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"
8 
9 #include <QWidget>
10 
12 class pqOutputPort;
13 class pqPipelineSource;
14 class pqPropertyWidget;
15 class pqProxy;
16 class pqView;
17 class vtkSMProperty;
18 class vtkSMProxy;
19 
32 class PQCOMPONENTS_EXPORT pqPropertiesPanel : public QWidget
33 {
34  Q_OBJECT
35  Q_PROPERTY(int panelMode READ panelMode WRITE setPanelMode);
36  typedef QWidget Superclass;
37 
38 public:
39  pqPropertiesPanel(QWidget* parent = nullptr);
40  ~pqPropertiesPanel() override;
41 
45  pqView* view() const;
46 
51  static int suggestedMargin() { return 0; }
52  static QMargins suggestedMargins() { return QMargins(0, 0, 0, 0); }
53  static int suggestedHorizontalSpacing() { return 4; }
54  static int suggestedVerticalSpacing() { return 4; }
55 
56  enum
57  {
58  SOURCE_PROPERTIES = 0x01,
59  DISPLAY_PROPERTIES = 0x02,
60  VIEW_PROPERTIES = 0x04,
61  ALL_PROPERTIES = SOURCE_PROPERTIES | DISPLAY_PROPERTIES | VIEW_PROPERTIES
62  };
63 
67  void setPanelMode(int val);
68  int panelMode() const { return this->PanelMode; }
69 
73  bool canApply();
74 
78  bool canReset();
79 
80 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
87  void apply();
88 
95  void reset();
96 
103  void showHelp();
104 
111  void propertiesRestoreDefaults();
112 
119  void propertiesSaveAsDefaults();
120 
127  void displayRestoreDefaults();
128 
135  void displaySaveAsDefaults();
136 
143  void viewRestoreDefaults();
144 
151  void viewSaveAsDefaults();
152 
157  void setView(pqView*);
158 
164  void setPipelineProxy(pqProxy*);
165 
170  void setRepresentation(pqDataRepresentation*);
171 Q_SIGNALS:
175  void applied();
176 
180  void applied(pqProxy*);
181 
185  void viewChanged(pqView*);
186 
187  void modified();
188  void resetDone();
189 
193  void helpRequested(const QString& groupname, const QString& proxyType);
194 
198  void deleteRequested(pqProxy* source);
199 
205  void applyEnableStateChanged();
206 
207 private Q_SLOTS:
212  void deleteProxy();
213 
217  void proxyDeleted(pqProxy*);
218 
223  void updatePanel();
224 
228  void updateDisplayPanel();
229 
233  void renderActiveView();
234 
238  void sourcePropertyChanged(bool change_finished = true);
239  void sourcePropertyChangeAvailable() { this->sourcePropertyChanged(false); }
240 
244  void updateButtonState();
245 
250  void updateButtonEnableState();
251 
252  void copyProperties();
253  void pasteProperties();
254  void copyDisplay();
255  void pasteDisplay();
256  void copyView();
257  void pasteView();
258 
259 protected:
260  void updatePropertiesPanel(pqProxy* source);
261  void updateDisplayPanel(pqDataRepresentation* repr);
262  void updateViewPanel(pqView* view);
263 
264 private:
265  class pqInternals;
266  friend class pqInternals;
267 
268  pqInternals* Internals;
269  int PanelMode;
270 
271  Q_DISABLE_COPY(pqPropertiesPanel)
272 };
273 
274 #endif
pqDataRepresentation is the superclass for a display for a pqPipelineSource i.e.
pqOutputPort is a server manager model item for an output port of any pqPipelineSource item...
Definition: pqOutputPort.h:29
pqPropertyWidget represents a widget created for each property of a proxy on the pqPropertiesPanel (f...
static int suggestedMargin()
methods used to obtain the recommended spacing and margins to be used for widgets.
#define PQCOMPONENTS_EXPORT
superclass for all SM properties
pqPropertiesPanel is the default panel used by paraview to edit source properties and display propert...
This is a PQ abstraction of a generic view module.
Definition: pqView.h:26
static QMargins suggestedMargins()
source
This class represents any registered Server Manager proxy.
Definition: pqProxy.h:28
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
static int suggestedVerticalSpacing()
PQ representation for a vtkSMProxy that can be involved in a pipeline.
static int suggestedHorizontalSpacing()