Mantid
|
Visitor setting new attribute value. More...
Public Member Functions | |
SetAttribute (FitPropertyBrowser *browser, QtProperty *prop, Mantid::Kernel::IValidator_sptr validator=Mantid::Kernel::IValidator_sptr()) | |
Public Member Functions inherited from Mantid::API::IFunction::AttributeVisitor< T > | |
T | operator() (bool &b) const |
implements static_visitor's operator() for bool More... | |
T | operator() (double &d) const |
implements static_visitor's operator() for double More... | |
T | operator() (int &i) const |
implements static_visitor's operator() for int More... | |
T | operator() (std::string &str) const |
implements static_visitor's operator() for std::string More... | |
T | operator() (std::vector< double > &v) const |
implements static_visitor's operator() for vector More... | |
virtual | ~AttributeVisitor ()=default |
Virtual destructor. More... | |
Protected Member Functions | |
void | apply (bool &b) const override |
Create bool property. More... | |
void | apply (double &d) const override |
Create double property. More... | |
void | apply (int &i) const override |
Create int property. More... | |
void | apply (std::string &str) const override |
Create string property. More... | |
void | apply (std::vector< double > &v) const override |
Create vector property. More... | |
Protected Member Functions inherited from Mantid::API::IFunction::AttributeVisitor< T > | |
virtual T | apply (bool &) const =0 |
Implement this method to access attribute as bool. More... | |
virtual T | apply (double &) const =0 |
Implement this method to access attribute as double. More... | |
virtual T | apply (int &) const =0 |
Implement this method to access attribute as int. More... | |
virtual T | apply (std::string &) const =0 |
Implement this method to access attribute as string. More... | |
virtual T | apply (std::vector< double > &) const =0 |
Implement this method to access attribute as vector. More... | |
template<typename T1 > | |
void | evaluateValidator (T1 &inputData) const |
Evaluates the validator associated with attribute this visitor is to visit. More... | |
Private Attributes | |
FitPropertyBrowser * | m_browser |
QtProperty * | m_prop |
Additional Inherited Members | |
Protected Attributes inherited from Mantid::API::IFunction::AttributeVisitor< T > | |
Mantid::Kernel::IValidator_sptr | m_validator = Mantid::Kernel::IValidator_sptr() |
Validator against which to evaluate attribute value to set. More... | |
Visitor setting new attribute value.
Depending on the attribute type the appropriate apply method is used.
Definition at line 665 of file PropertyHandler.cpp.
|
inline |
Definition at line 667 of file PropertyHandler.cpp.
References Mantid::API::IFunction::AttributeVisitor< T >::m_validator.
|
inlineoverrideprotectedvirtual |
Create bool property.
Implements Mantid::API::IFunction::AttributeVisitor< T >.
Definition at line 696 of file PropertyHandler.cpp.
References Mantid::API::IFunction::AttributeVisitor< T >::evaluateValidator(), MantidQt::MantidWidgets::FitPropertyBrowser::m_boolManager, m_browser, and m_prop.
|
inlineoverrideprotectedvirtual |
Create double property.
Implements Mantid::API::IFunction::AttributeVisitor< T >.
Definition at line 682 of file PropertyHandler.cpp.
References Mantid::Geometry::d, Mantid::API::IFunction::AttributeVisitor< T >::evaluateValidator(), m_browser, MantidQt::MantidWidgets::FitPropertyBrowser::m_doubleManager, and m_prop.
|
inlineoverrideprotectedvirtual |
Create int property.
Implements Mantid::API::IFunction::AttributeVisitor< T >.
Definition at line 689 of file PropertyHandler.cpp.
References Mantid::API::IFunction::AttributeVisitor< T >::evaluateValidator(), m_browser, MantidQt::MantidWidgets::FitPropertyBrowser::m_intManager, and m_prop.
|
inlineoverrideprotectedvirtual |
Create string property.
Implements Mantid::API::IFunction::AttributeVisitor< T >.
Definition at line 675 of file PropertyHandler.cpp.
References Mantid::API::IFunction::AttributeVisitor< T >::evaluateValidator(), MantidQt::MantidWidgets::FitPropertyBrowser::getStringPropertyValue(), m_browser, and m_prop.
|
inlineoverrideprotectedvirtual |
Create vector property.
Implements Mantid::API::IFunction::AttributeVisitor< T >.
Definition at line 703 of file PropertyHandler.cpp.
References Mantid::API::IFunction::AttributeVisitor< T >::evaluateValidator(), m_browser, m_prop, Mantid::API::IFunction::AttributeVisitor< T >::m_validator, MantidQt::MantidWidgets::FitPropertyBrowser::m_vectorDoubleManager, and MantidQt::MantidWidgets::FitPropertyBrowser::m_vectorSizeManager.
|
private |
Definition at line 738 of file PropertyHandler.cpp.
Referenced by apply().
|
private |
Definition at line 739 of file PropertyHandler.cpp.
Referenced by apply().