Mantid
|
Interface for modifiers to Property's that specify if they should be enabled or visible in a GUI. More...
#include <IPropertySettings.h>
Public Member Functions | |
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 Member Functions | |
IPropertySettings (const IPropertySettings &)=default | |
Interface for modifiers to Property's that specify if they should be enabled or visible in a GUI.
They are set on an algorithm via Algorithm::setPropertySettings()
Definition at line 27 of file IPropertySettings.h.
|
default |
Constructor.
|
virtualdefault |
Destructor.
|
protecteddefault |
|
inlinevirtual |
The function user have to overload it in their custom code to modify the property according to the changes to other properties.
Currently it has been tested to modify the property values as function of other properties
Allowed property values are obtained from property's allowedValues function, and the purpose the function interfaced here is to modify its output.
allowedValues function on propertyWithValue class obtains its data from a validator, so in the case of simple PropertyWithValue, this function has to replace the validator. For WorkspaceProperty, which obtains its values from dataservice and filters them by validators, a new validator has to be a new filter
Reimplemented in Mantid::Algorithms::MonIDPropChanger, and Mantid::Kernel::SetValueWhenProperty.
Definition at line 71 of file IPropertySettings.h.
Referenced by MantidQt::API::AlgorithmPropertiesWidget::hideOrDisableProperties().
|
pure virtual |
Make a copy of the present type of IPropertySettings.
Implemented in Mantid::Algorithms::MonIDPropChanger, Mantid::API::EnabledWhenWorkspaceIsType< T >, Mantid::Crystal::OrEnabledWhenProperties, Mantid::Kernel::EnabledWhenProperty, Mantid::Kernel::InvisibleProperty, Mantid::Kernel::SetValueWhenProperty, and Mantid::Kernel::VisibleWhenProperty.
|
inlinevirtual |
to verify if the properties, this one depends on have changed or other special condition occurs which needs the framework to react to
Reimplemented in Mantid::Kernel::SetValueWhenProperty, and Mantid::Algorithms::MonIDPropChanger.
Definition at line 48 of file IPropertySettings.h.
References UNUSED_ARG.
Referenced by MantidQt::API::AlgorithmPropertiesWidget::hideOrDisableProperties().
|
inlinevirtual |
Is the property to be shown as "enabled" in the GUI.
Default true.
Reimplemented in Mantid::Crystal::OrEnabledWhenProperties, Mantid::Kernel::EnabledWhenProperty, Mantid::Kernel::VisibleWhenProperty, Mantid::API::EnabledWhenWorkspaceIsType< T >, and Mantid::Algorithms::MonIDPropChanger.
Definition at line 36 of file IPropertySettings.h.
References UNUSED_ARG.
Referenced by Mantid::Kernel::PropertyManager::asJson(), and export_IPropertySettings().
|
inlinevirtual |
Is the property to be shown in the GUI? Default true.
Reimplemented in Mantid::Kernel::InvisibleProperty, Mantid::Kernel::EnabledWhenProperty, Mantid::Kernel::VisibleWhenProperty, and Mantid::API::EnabledWhenWorkspaceIsType< T >.
Definition at line 42 of file IPropertySettings.h.
References UNUSED_ARG.
Referenced by export_IPropertySettings(), and MantidQt::API::AlgorithmPropertiesWidget::hideOrDisableProperties().