Mantid
Loading...
Searching...
No Matches
VisibleWhenProperty.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2011 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 +
7#pragma once
8
10#include "MantidKernel/System.h"
11
12#include <stdexcept>
13
14namespace Mantid {
15namespace Kernel {
16
20class MANTID_KERNEL_DLL VisibleWhenProperty : public EnabledWhenProperty {
21public:
24 VisibleWhenProperty(const std::string &otherPropName, ePropertyCriterion when, const std::string &value = "");
25
29 VisibleWhenProperty(const VisibleWhenProperty &conditionOne, const VisibleWhenProperty &conditionTwo,
30 eLogicOperator logicOperator);
31
35 VisibleWhenProperty(std::shared_ptr<VisibleWhenProperty> &&conditionOne,
36 std::shared_ptr<VisibleWhenProperty> &&conditionTwo, eLogicOperator logicOperator);
37
40 virtual bool checkComparison(const IPropertyManager *algo) const override;
41
43 bool isEnabled(const IPropertyManager *algo) const override;
44
47 bool isVisible(const IPropertyManager *algo) const override;
48
50 IPropertySettings *clone() const override;
51
52private:
54 std::shared_ptr<ComparisonDetails<VisibleWhenProperty>> m_comparisonDetails = nullptr;
55};
56
57} // namespace Kernel
58} // namespace Mantid
double value
The value of the point.
Definition: FitMW.cpp:51
Interface to PropertyManager.
Interface for modifiers to Property's that specify if they should be enabled or visible in a GUI.
Same as EnabledWhenProperty, but returns the value for the isVisible() property instead of the isEnab...
ePropertyCriterion
Enum for use in EnabledWhenProperty.
eLogicOperator
Enum for use when combining two EnabledWhenPropertyItems.
Helper class which provides the Collimation Length for SANS instruments.