Mantid
Loading...
Searching...
No Matches
IPropertySettings.cpp
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
10#include <boost/python/class.hpp>
11#include <boost/python/register_ptr_to_python.hpp>
12
14using namespace boost::python;
15
17
19 register_ptr_to_python<IPropertySettings *>();
20
21 class_<IPropertySettings, boost::noncopyable>("IPropertySettings", no_init)
22 .def("isEnabled", &IPropertySettings::isEnabled, (arg("self"), arg("alg")),
23 "Is the property to be shown as enabled in the GUI. Default true.")
24
25 .def("isVisible", &IPropertySettings::isVisible, (arg("self"), arg("alg")),
26 "Is the property to be shown in the GUI? Default true.")
27
28 .def("dependsOn", &IPropertySettings::dependsOn, (arg("self"), arg("thisProp")),
29 "Other properties that this property depends on.")
30
31 .def("_isConditionChanged", &IPropertySettings::isConditionChanged,
32 (arg("self"), arg("alg"), arg("changedPropName")),
33 "Has the dependency condition changed: exported for testing use only")
34
35 .def("_applyChanges", &IPropertySettings::applyChanges, (arg("self"), arg("alg"), arg("currentProperty")),
36 "Apply the changed criterion to the current property: exported for testing use only");
37}
#define GET_POINTER_SPECIALIZATION(TYPE)
Definition GetPointer.h:17
void export_IPropertySettings()
Interface for modifiers to Property's that specify if they should be enabled or visible in a GUI.
virtual std::vector< std::string > dependsOn(const std::string &) const
Other properties that this property depends on.
virtual bool isEnabled(const IPropertyManager *algo) const
Is the property to be shown as "enabled" in the GUI.
virtual bool applyChanges(const IPropertyManager *algo, const std::string &currentPropName)
Overload this virtual function in order to modify the current property based on changes to other prop...
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...
virtual bool isVisible(const IPropertyManager *algo) const
Is the property to be shown in the GUI? Default true.