pqBoxPropertyWidget.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 pqBoxPropertyWidget_h
5 #define pqBoxPropertyWidget_h
6 
8 #include <QPointer> // For QScopedPointer
9 
10 // Forward declarations to avoid heavy includes in the header
11 class vtkSMProxy;
12 class vtkSMPropertyGroup;
13 class vtkSMProperty;
14 
57 class PQAPPLICATIONCOMPONENTS_EXPORT pqBoxPropertyWidget : public pqInteractivePropertyWidget
58 {
59  Q_OBJECT
61 
62 public:
63  pqBoxPropertyWidget(vtkSMProxy* proxy, vtkSMPropertyGroup* smgroup, QWidget* parent = nullptr,
64  bool hideReferenceBounds = false);
65  ~pqBoxPropertyWidget() override;
66 
70  void apply() override;
71 
72 protected Q_SLOTS:
76  void placeWidget() override;
77 
78 private Q_SLOTS:
82  void onTabChanged(int index);
83 
87  void onSMPropertiesChanged();
88 
92  void matrixTextEdited();
93 
94 private: // NOLINT(readability-redundant-access-specifiers)
95  Q_DISABLE_COPY(pqBoxPropertyWidget)
96  class pqUi;
97  QScopedPointer<pqUi> Ui;
98  pqPropertyLinks WidgetLinks;
99  bool BoxIsRelativeToInput;
100 
101  QMetaObject::Connection PlaceWidgetConnection;
102 
103  // Matrix edit integration
104  vtkSMProperty* Position = nullptr;
105  vtkSMProperty* Rotation = nullptr;
106  vtkSMProperty* Scale = nullptr;
107 
112  void fillMatrixTextFromProperties();
113 };
114 
115 #endif
superclass for all SM properties
custom property widget using vtkBoxWidget2 and vtkBoxRepresentation.
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
virtual void placeWidget()=0
Places the interactive widget using current data source information.
index
pqInteractivePropertyWidget is an abstract pqPropertyWidget subclass designed to serve as the supercl...
virtual void apply()