pqEnableWidgetDecorator.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3 // SPDX-License-Identifier: BSD-3-Clause
4 #ifndef pqEnableWidgetDecorator_h
5 #define pqEnableWidgetDecorator_h
6 
7 #include "pqApplicationComponentsModule.h"
9 #include "vtkEnableDecorator.h"
10 
17 class PQAPPLICATIONCOMPONENTS_EXPORT pqEnableWidgetDecorator : public pqBoolPropertyWidgetDecorator
18 {
19  Q_OBJECT
21 
22 public:
24  ~pqEnableWidgetDecorator() override = default;
25 
29  bool enableWidget() const override { return this->decoratorLogic->IsBoolProperty(); }
30 
31 private:
32  Q_DISABLE_COPY(pqEnableWidgetDecorator)
33 
34  vtkNew<vtkEnableDecorator> decoratorLogic;
35 };
36 
37 #endif
pqBoolPropertyWidgetDecorator is a base class for enable/disable or show/hide widgets based on the st...
pqPropertyWidget represents a widget created for each property of a proxy on the pqPropertiesPanel (f...
bool enableWidget() const override
overridden from pqPropertyWidget.
pqEnableWidgetDecorator can be used to enable/disable a widget based on the status of another propert...
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
pqPropertyWidgetDecorator provides a mechanism to decorate pqPropertyWidget instances to add logic to...