Mantid
|
Attribute visitor to create a QtProperty. More...
Public Member Functions | |
CreateAttributeProperty (FitPropertyBrowser *browser, PropertyHandler *handler, QString name, Mantid::Kernel::IValidator_sptr validator=nullptr) | |
Public Member Functions inherited from Mantid::API::IFunction::ConstAttributeVisitor< QtProperty * > | |
QtProperty * | operator() (const bool &b) const |
implements static_visitor's operator() for bool More... | |
QtProperty * | operator() (const double &d) const |
implements static_visitor's operator() for double More... | |
QtProperty * | operator() (const int &i) const |
implements static_visitor's operator() for int More... | |
QtProperty * | operator() (const std::string &str) const |
implements static_visitor's operator() for std::string More... | |
QtProperty * | operator() (const std::vector< double > &v) const |
implements static_visitor's operator() for vector More... | |
virtual | ~ConstAttributeVisitor ()=default |
Virtual destructor. More... | |
Protected Member Functions | |
QtProperty * | apply (const bool &b) const override |
Create bool property. More... | |
QtProperty * | apply (const double &d) const override |
Create double property. More... | |
QtProperty * | apply (const int &i) const override |
Create int property. More... | |
QtProperty * | apply (const std::string &str) const override |
Create string property. More... | |
QtProperty * | apply (const std::vector< double > &b) const override |
Create vector property. More... | |
Protected Member Functions inherited from Mantid::API::IFunction::ConstAttributeVisitor< QtProperty * > | |
virtual QtProperty * | apply (const bool &i) const=0 |
Implement this mathod to access attribute as bool. More... | |
virtual QtProperty * | apply (const double &d) const=0 |
Implement this mathod to access attribute as double. More... | |
virtual QtProperty * | apply (const int &i) const=0 |
Implement this mathod to access attribute as int. More... | |
virtual QtProperty * | apply (const std::string &str) const=0 |
Implement this mathod to access attribute as string. More... | |
virtual QtProperty * | apply (const std::vector< double > &) const=0 |
Implement this mathod to access attribute as vector. More... | |
void | evaluateValidator (T1 &inputData) const |
Evaluates the validator associated with attribute this visitor is to visit. More... | |
Private Attributes | |
FitPropertyBrowser * | m_browser |
PropertyHandler * | m_handler |
QString | m_name |
Additional Inherited Members | |
Protected Attributes inherited from Mantid::API::IFunction::ConstAttributeVisitor< QtProperty * > | |
Mantid::Kernel::IValidator_sptr | m_validator |
Validator against which to evaluate attribute value to set. More... | |
Attribute visitor to create a QtProperty.
Depending on the attribute type the appropriate apply method is used.
Definition at line 134 of file PropertyHandler.cpp.
|
inline |
Definition at line 136 of file PropertyHandler.cpp.
References Mantid::API::IFunction::ConstAttributeVisitor< QtProperty * >::m_validator.
|
inlineoverrideprotectedvirtual |
Create bool property.
Implements Mantid::API::IFunction::ConstAttributeVisitor< QtProperty * >.
Definition at line 170 of file PropertyHandler.cpp.
References MantidQt::MantidWidgets::FitPropertyBrowser::m_boolManager, m_browser, and m_name.
|
inlineoverrideprotectedvirtual |
Create double property.
Implements Mantid::API::IFunction::ConstAttributeVisitor< QtProperty * >.
Definition at line 158 of file PropertyHandler.cpp.
References MantidQt::MantidWidgets::FitPropertyBrowser::addDoubleProperty(), Mantid::Geometry::d, m_browser, MantidQt::MantidWidgets::FitPropertyBrowser::m_doubleManager, and m_name.
|
inlineoverrideprotectedvirtual |
Create int property.
Implements Mantid::API::IFunction::ConstAttributeVisitor< QtProperty * >.
Definition at line 164 of file PropertyHandler.cpp.
References m_browser, MantidQt::MantidWidgets::FitPropertyBrowser::m_intManager, and m_name.
|
inlineoverrideprotectedvirtual |
Create string property.
Implements Mantid::API::IFunction::ConstAttributeVisitor< QtProperty * >.
Definition at line 144 of file PropertyHandler.cpp.
References MantidQt::MantidWidgets::FitPropertyBrowser::addStringListProperty(), MantidQt::MantidWidgets::FitPropertyBrowser::addStringProperty(), m_browser, m_name, Mantid::API::IFunction::ConstAttributeVisitor< QtProperty * >::m_validator, and MantidQt::MantidWidgets::FitPropertyBrowser::setStringPropertyValue().
|
inlineoverrideprotectedvirtual |
Create vector property.
Implements Mantid::API::IFunction::ConstAttributeVisitor< QtProperty * >.
Definition at line 176 of file PropertyHandler.cpp.
References MantidQt::MantidWidgets::FitPropertyBrowser::addDoubleProperty(), m_browser, m_handler, m_name, MantidQt::MantidWidgets::FitPropertyBrowser::m_vectorDoubleManager, MantidQt::MantidWidgets::FitPropertyBrowser::m_vectorManager, MantidQt::MantidWidgets::PropertyHandler::m_vectorMembers, MantidQt::MantidWidgets::FitPropertyBrowser::m_vectorSizeManager, and MantidQt::MantidWidgets::PropertyHandler::m_vectorSizes.
|
private |
Definition at line 199 of file PropertyHandler.cpp.
Referenced by apply().
|
private |
Definition at line 200 of file PropertyHandler.cpp.
Referenced by apply().
|
private |
Definition at line 201 of file PropertyHandler.cpp.
Referenced by apply().