Mantid
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
MantidQt::MantidWidgets::SetAttributeFromProperty Class Reference

Attribute visitor to set an attribute from a QtProperty. More...

Inheritance diagram for MantidQt::MantidWidgets::SetAttributeFromProperty:
Mantid::API::IFunction::AttributeVisitor< T >

Public Member Functions

 SetAttributeFromProperty (FunctionTreeView *browser, QtProperty *prop)
 
- Public Member Functions inherited from Mantid::API::IFunction::AttributeVisitor< T >
operator() (bool &b) const
 implements static_visitor's operator() for bool More...
 
operator() (double &d) const
 implements static_visitor's operator() for double More...
 
operator() (int &i) const
 implements static_visitor's operator() for int More...
 
operator() (std::string &str) const
 implements static_visitor's operator() for std::string More...
 
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
 Set bool attribute. More...
 
void apply (double &d) const override
 Set double attribute. More...
 
void apply (int &i) const override
 Set int attribute. More...
 
void apply (std::string &str) const override
 Set string attribute. More...
 
void apply (std::vector< double > &v) const override
 Set vector attribute. 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

FunctionTreeViewm_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...
 

Detailed Description

Attribute visitor to set an attribute from a QtProperty.

Depending on the attribute type the appropriate apply() method is used.

Definition at line 568 of file FunctionTreeView.cpp.

Constructor & Destructor Documentation

◆ SetAttributeFromProperty()

MantidQt::MantidWidgets::SetAttributeFromProperty::SetAttributeFromProperty ( FunctionTreeView browser,
QtProperty *  prop 
)
inline

Definition at line 570 of file FunctionTreeView.cpp.

Member Function Documentation

◆ apply() [1/5]

void MantidQt::MantidWidgets::SetAttributeFromProperty::apply ( bool &  b) const
inlineoverrideprotectedvirtual

◆ apply() [2/5]

void MantidQt::MantidWidgets::SetAttributeFromProperty::apply ( double &  d) const
inlineoverrideprotectedvirtual

◆ apply() [3/5]

void MantidQt::MantidWidgets::SetAttributeFromProperty::apply ( int &  i) const
inlineoverrideprotectedvirtual

◆ apply() [4/5]

void MantidQt::MantidWidgets::SetAttributeFromProperty::apply ( std::string &  str) const
inlineoverrideprotectedvirtual

◆ apply() [5/5]

void MantidQt::MantidWidgets::SetAttributeFromProperty::apply ( std::vector< double > &  v) const
inlineoverrideprotectedvirtual

Member Data Documentation

◆ m_browser

FunctionTreeView* MantidQt::MantidWidgets::SetAttributeFromProperty::m_browser
private

Definition at line 609 of file FunctionTreeView.cpp.

Referenced by apply().

◆ m_prop

QtProperty* MantidQt::MantidWidgets::SetAttributeFromProperty::m_prop
private

Definition at line 610 of file FunctionTreeView.cpp.

Referenced by apply().


The documentation for this class was generated from the following file: