pqPropertyWidgetDecorator.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 pqPropertyWidgetDecorator_h
5 #define pqPropertyWidgetDecorator_h
6 
7 #include "pqPropertyWidget.h"
8 #include "vtkSmartPointer.h" // needed for vtkSmartPointer
9 
10 class vtkPVXMLElement;
11 
20 {
21  Q_OBJECT
22  typedef QObject Superclass;
23 
24 public:
34  ~pqPropertyWidgetDecorator() override;
35 
39  pqPropertyWidget* parentWidget() const;
40 
49  virtual bool canShowWidget(bool show_advanced) const
50  {
51  Q_UNUSED(show_advanced);
52  return true;
53  }
54 
63  virtual bool enableWidget() const { return true; }
64 
69  static pqPropertyWidgetDecorator* create(vtkPVXMLElement* xml, pqPropertyWidget* parent);
70 
71 Q_SIGNALS:
77  void visibilityChanged();
78  void enableStateChanged();
79 
80 protected:
81  vtkPVXMLElement* xml() const;
82 
83 private:
84  Q_DISABLE_COPY(pqPropertyWidgetDecorator)
85 
87 };
88 
89 #endif
pqPropertyWidget represents a widget created for each property of a proxy on the pqPropertiesPanel (f...
virtual bool enableWidget() const
Override this method to override the enable state of the widget in the panel.
#define PQCOMPONENTS_EXPORT
virtual bool canShowWidget(bool show_advanced) const
Override this method to override the visibility of the widget in the panel.
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...