Mantid
|
Show a property as enabled when the workspace pointed to by another is of a given type. More...
#include <EnabledWhenWorkspaceIsType.h>
Public Member Functions | |
virtual bool | checkCriterion (const Kernel::IPropertyManager *algo) const |
Does the validator fulfill the criterion based on the other property values? More... | |
IPropertySettings * | clone () const override |
Make a copy of the present type of validator. More... | |
EnabledWhenWorkspaceIsType (std::string otherPropName, bool enabledSetting=true) | |
Constructor. More... | |
bool | isEnabled (const Kernel::IPropertyManager *algo) const override |
Return true/false based on whether the other property satisfies the criterion. More... | |
bool | isVisible (const Kernel::IPropertyManager *) const override |
Return true always. More... | |
Public Member Functions inherited from Mantid::Kernel::IPropertySettings | |
virtual void | applyChanges (const IPropertyManager *, Property *const) |
The function user have to overload it in their custom code to modify the property according to the changes to other properties. More... | |
virtual IPropertySettings * | clone () const =0 |
Make a copy of the present type of IPropertySettings. More... | |
IPropertySettings ()=default | |
Constructor. More... | |
virtual bool | isConditionChanged (const IPropertyManager *algo, const std::string &changedPropName="") const |
to verify if the properties, this one depends on have changed or other special condition occurs which needs the framework to react to More... | |
virtual bool | isEnabled (const IPropertyManager *algo) const |
Is the property to be shown as "enabled" in the GUI. More... | |
virtual bool | isVisible (const IPropertyManager *algo) const |
Is the property to be shown in the GUI? Default true. More... | |
virtual | ~IPropertySettings ()=default |
Destructor. More... | |
Protected Attributes | |
bool | m_enabledSetting |
Set Enabled to this. More... | |
std::string | m_otherPropName |
Name of the OTHER property that we will check. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Mantid::Kernel::IPropertySettings | |
IPropertySettings (const IPropertySettings &)=default | |
Show a property as enabled when the workspace pointed to by another is of a given type.
Definition at line 29 of file EnabledWhenWorkspaceIsType.h.
|
inline |
Constructor.
otherPropName | :: Name of the OTHER property that we will check. |
enabledSetting | :: Set Enabled on this property to this value when the workspace is of type T. Default true. |
Definition at line 37 of file EnabledWhenWorkspaceIsType.h.
|
inlinevirtual |
Does the validator fulfill the criterion based on the other property values?
Definition at line 46 of file EnabledWhenWorkspaceIsType.h.
References Mantid::Kernel::IPropertyManager::getPointerToProperty(), Mantid::Kernel::SingletonHolder< T >::Instance(), and Mantid::Kernel::Property::value().
|
inlineoverridevirtual |
Make a copy of the present type of validator.
Implements Mantid::Kernel::IPropertySettings.
Definition at line 89 of file EnabledWhenWorkspaceIsType.h.
|
inlineoverridevirtual |
Return true/false based on whether the other property satisfies the criterion.
Reimplemented from Mantid::Kernel::IPropertySettings.
Definition at line 81 of file EnabledWhenWorkspaceIsType.h.
|
inlineoverridevirtual |
Return true always.
Reimplemented from Mantid::Kernel::IPropertySettings.
Definition at line 85 of file EnabledWhenWorkspaceIsType.h.
|
protected |
Set Enabled to this.
Definition at line 97 of file EnabledWhenWorkspaceIsType.h.
|
protected |
Name of the OTHER property that we will check.
Definition at line 95 of file EnabledWhenWorkspaceIsType.h.