pqPropertiesPanel.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 pqPropertiesPanel_h
5 #define pqPropertiesPanel_h
6 
7 #include "pqComponentsModule.h"
9 
10 #include <QWidget>
11 
13 class pqOutputPort;
14 class pqPipelineSource;
15 class pqPropertyWidget;
16 class pqProxy;
17 class pqView;
18 class vtkSMProperty;
19 class vtkSMProxy;
20 
33 class PQCOMPONENTS_EXPORT pqPropertiesPanel : public QWidget
34 {
35  Q_OBJECT
36  Q_PROPERTY(int panelMode READ panelMode WRITE setPanelMode);
37  typedef QWidget Superclass;
38 
39 public:
40  pqPropertiesPanel(QWidget* parent = nullptr);
41  ~pqPropertiesPanel() override;
42 
46  PARAVIEW_DEPRECATED_IN_5_11_0("Use `vtkPVGeneralSettings::SetAutoApply()` instead")
47  static void setAutoApply(bool enabled);
48 
52  PARAVIEW_DEPRECATED_IN_5_11_0("Use `vtkPVGeneralSettings::GetAutoApply()` instead")
53  static bool autoApply();
54 
58  PARAVIEW_DEPRECATED_IN_5_11_0("Use `pqApplyBehavior::setAutoApplyDelay()` instead")
59  static void setAutoApplyDelay(int delay);
60 
64  PARAVIEW_DEPRECATED_IN_5_11_0("Use `pqApplyBehavior::autoApplyDelay()` instead")
65  static int autoApplyDelay();
66 
70  pqView* view() const;
71 
76  static int suggestedMargin() { return 0; }
77  static QMargins suggestedMargins() { return QMargins(0, 0, 0, 0); }
78  static int suggestedHorizontalSpacing() { return 4; }
79  static int suggestedVerticalSpacing() { return 4; }
80 
81  enum
82  {
83  SOURCE_PROPERTIES = 0x01,
84  DISPLAY_PROPERTIES = 0x02,
85  VIEW_PROPERTIES = 0x04,
86  ALL_PROPERTIES = SOURCE_PROPERTIES | DISPLAY_PROPERTIES | VIEW_PROPERTIES
87  };
88 
92  void setPanelMode(int val);
93  int panelMode() const { return this->PanelMode; }
94 
98  bool canApply();
99 
103  bool canReset();
104 
105 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
112  void apply();
113 
120  void reset();
121 
128  void showHelp();
129 
136  void propertiesRestoreDefaults();
137 
144  void propertiesSaveAsDefaults();
145 
152  void displayRestoreDefaults();
153 
160  void displaySaveAsDefaults();
161 
168  void viewRestoreDefaults();
169 
176  void viewSaveAsDefaults();
177 
182  void setView(pqView*);
183 
189  void setPipelineProxy(pqProxy*);
190 
195  void setRepresentation(pqDataRepresentation*);
196 Q_SIGNALS:
200  void applied();
201 
205  void applied(pqProxy*);
206 
210  void viewChanged(pqView*);
211 
212  void modified();
213  void resetDone();
214 
218  void helpRequested(const QString& groupname, const QString& proxyType);
219 
223  void deleteRequested(pqProxy* source);
224 
230  void applyEnableStateChanged();
231 
232 private Q_SLOTS:
237  void deleteProxy();
238 
242  void proxyDeleted(pqProxy*);
243 
248  void updatePanel();
249 
253  void updateDisplayPanel();
254 
258  void renderActiveView();
259 
263  void sourcePropertyChanged(bool change_finished = true);
264  void sourcePropertyChangeAvailable() { this->sourcePropertyChanged(false); }
265 
269  void updateButtonState();
270 
275  void updateButtonEnableState();
276 
277  void copyProperties();
278  void pasteProperties();
279  void copyDisplay();
280  void pasteDisplay();
281  void copyView();
282  void pasteView();
283 
284 protected:
285  void updatePropertiesPanel(pqProxy* source);
286  void updateDisplayPanel(pqDataRepresentation* repr);
287  void updateViewPanel(pqView* view);
288 
289 private:
290  class pqInternals;
291  friend class pqInternals;
292 
293  pqInternals* Internals;
294  int PanelMode;
295 
296  Q_DISABLE_COPY(pqPropertiesPanel)
297 };
298 
299 #endif
pqPropertiesPanel
pqPropertiesPanel is the default panel used by paraview to edit source properties and display propert...
Definition: pqPropertiesPanel.h:33
pqView
This is a PQ abstraction of a generic view module.
Definition: pqView.h:26
pqPropertyWidget
pqPropertyWidget represents a widget created for each property of a proxy on the pqPropertiesPanel (f...
Definition: pqPropertyWidget.h:25
pqDataRepresentation
pqDataRepresentation is the superclass for a display for a pqPipelineSource i.e.
Definition: pqDataRepresentation.h:24
vtkSMProperty
superclass for all SM properties
Definition: vtkSMProperty.h:144
vtkSMProxy
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
vtkPVGeneralSettings
object for general options.
Definition: vtkPVGeneralSettings.h:24
pqPropertiesPanel::panelMode
int panelMode() const
Definition: pqPropertiesPanel.h:93
pqPropertiesPanel::suggestedMargins
static QMargins suggestedMargins()
Definition: pqPropertiesPanel.h:77
pqApplyBehavior
Definition: pqApplyBehavior.h:32
vtkParaViewDeprecation.h
pqPipelineSource
PQ representation for a vtkSMProxy that can be involved in a pipeline.
Definition: pqPipelineSource.h:32
pqPropertiesPanel::suggestedVerticalSpacing
static int suggestedVerticalSpacing()
Definition: pqPropertiesPanel.h:79
PARAVIEW_DEPRECATED_IN_5_11_0
#define PARAVIEW_DEPRECATED_IN_5_11_0(reason)
Definition: vtkParaViewDeprecation.h:109
pqProxy
This class represents any registered Server Manager proxy.
Definition: pqProxy.h:28
pqOutputPort
pqOutputPort is a server manager model item for an output port of any pqPipelineSource item.
Definition: pqOutputPort.h:29
pqPropertiesPanel::suggestedHorizontalSpacing
static int suggestedHorizontalSpacing()
Definition: pqPropertiesPanel.h:78