pqDynamicPropertiesWidget.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
3 
4 #ifndef pqDynamicPropertiesWidget_h
5 #define pqDynamicPropertiesWidget_h
6 
7 #include "pqComponentsModule.h"
8 #include "pqPropertyWidget.h"
9 
10 #include <QMap>
11 #include <QString>
12 
13 class QFormLayout;
14 class QGroupBox;
15 class QVBoxLayout;
16 
66 class PQCOMPONENTS_EXPORT pqDynamicPropertiesWidget : public pqPropertyWidget
67 {
68  Q_OBJECT
70 
71 public:
72  pqDynamicPropertiesWidget(vtkSMProxy* proxy, vtkSMProperty* property, QWidget* parent = nullptr);
73  ~pqDynamicPropertiesWidget() override;
74 
75 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
76  void setHeaderLabel(const QString& str);
77  void setPushPropertyName(const QByteArray& pName);
78 
79 Q_SIGNALS:
80  void widgetModified();
81 
82 protected Q_SLOTS:
87  void updateProperty();
91  void updatePropertyImpl();
92 
93 protected: // NOLINT(readability-redundant-access-specifiers)
94  bool eventFilter(QObject* obj, QEvent* e) override;
98  void propertyChanged();
99 
100 private:
101  Q_DISABLE_COPY(pqDynamicPropertiesWidget)
102 
103  void buildWidget(vtkSMProperty* infoProp);
104  void clearProperties();
105  int findRow(const QString& key);
106 
110  QByteArray PushPropertyName;
111 
112  bool PropertyUpdatePending; // Only update the property once per 250 ms.
113  bool IgnorePushPropertyUpdates; // don't react to our own updates.
114 
115  QVBoxLayout* VBox;
116  QGroupBox* GroupBox;
117  QFormLayout* Form;
118 
119  class pqInternals;
120  pqInternals* Internals;
121 
122  class DomainModifiedObserver;
123  friend DomainModifiedObserver;
124 };
125 
126 #endif // pqDynamicPropertiesWidget_h
pqPropertyWidget represents a widget created for each property of a proxy on the pqPropertiesPanel (f...
superclass for all SM properties
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
Creates a panel_widget for setting dynamically generated properties.
key