Mantid
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
Mantid::API::EnabledWhenWorkspaceIsType< T > Class Template Reference

Show a property as enabled when the workspace pointed to by another is of a given type. More...

#include <EnabledWhenWorkspaceIsType.h>

Inheritance diagram for Mantid::API::EnabledWhenWorkspaceIsType< T >:
Mantid::Kernel::IPropertySettings

Public Member Functions

virtual bool checkCriterion (const Kernel::IPropertyManager *algo) const
 Does the validator fulfill the criterion based on the other property values? More...
 
IPropertySettingsclone () 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 IPropertySettingsclone () 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
 

Detailed Description

template<typename T>
class Mantid::API::EnabledWhenWorkspaceIsType< T >

Show a property as enabled when the workspace pointed to by another is of a given type.

Author
Janik Zikovsky
Date
2011-09-21

Definition at line 29 of file EnabledWhenWorkspaceIsType.h.

Constructor & Destructor Documentation

◆ EnabledWhenWorkspaceIsType()

template<typename T >
Mantid::API::EnabledWhenWorkspaceIsType< T >::EnabledWhenWorkspaceIsType ( std::string  otherPropName,
bool  enabledSetting = true 
)
inline

Constructor.

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

Member Function Documentation

◆ checkCriterion()

template<typename T >
virtual bool Mantid::API::EnabledWhenWorkspaceIsType< T >::checkCriterion ( const Kernel::IPropertyManager algo) const
inlinevirtual

Does the validator fulfill the criterion based on the other property values?

Returns
true if fulfilled or if any problem was found (missing property, e.g.).

Definition at line 46 of file EnabledWhenWorkspaceIsType.h.

References Mantid::Kernel::IPropertyManager::getPointerToProperty(), Mantid::Kernel::SingletonHolder< T >::Instance(), and Mantid::Kernel::Property::value().

◆ clone()

template<typename T >
IPropertySettings * Mantid::API::EnabledWhenWorkspaceIsType< T >::clone ( ) const
inlineoverridevirtual

Make a copy of the present type of validator.

Implements Mantid::Kernel::IPropertySettings.

Definition at line 89 of file EnabledWhenWorkspaceIsType.h.

◆ isEnabled()

template<typename T >
bool Mantid::API::EnabledWhenWorkspaceIsType< T >::isEnabled ( const Kernel::IPropertyManager algo) const
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.

◆ isVisible()

template<typename T >
bool Mantid::API::EnabledWhenWorkspaceIsType< T >::isVisible ( const Kernel::IPropertyManager ) const
inlineoverridevirtual

Return true always.

Reimplemented from Mantid::Kernel::IPropertySettings.

Definition at line 85 of file EnabledWhenWorkspaceIsType.h.

Member Data Documentation

◆ m_enabledSetting

template<typename T >
bool Mantid::API::EnabledWhenWorkspaceIsType< T >::m_enabledSetting
protected

Set Enabled to this.

Definition at line 97 of file EnabledWhenWorkspaceIsType.h.

◆ m_otherPropName

template<typename T >
std::string Mantid::API::EnabledWhenWorkspaceIsType< T >::m_otherPropName
protected

Name of the OTHER property that we will check.

Definition at line 95 of file EnabledWhenWorkspaceIsType.h.


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