pqCoordinateFramePropertyWidget.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 pqCoordinateFramePropertyWidget_h
5 #define pqCoordinateFramePropertyWidget_h
6 
8 
29 {
30  Q_OBJECT
31  Q_PROPERTY(int lockedAxis READ getLockedAxis WRITE setLockedAxis NOTIFY lockedAxisChangedByUser)
33 
34 public:
36  vtkSMProxy* proxy, vtkSMPropertyGroup* smgroup, QWidget* parent = nullptr);
38 
42  int getLockedAxis() const;
43  void setLockedAxis(int lockedAxis);
44 
45 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
49  void useXNormal() { this->setNormal(1, 0, 0); }
50 
54  void useYNormal() { this->setNormal(0, 1, 0); }
55 
59  void useZNormal() { this->setNormal(0, 0, 1); }
60 
64  void resetToWorldXYZ();
65 
69  void resetToDataBounds();
70 
74  void resetCameraToNormal();
75 
79  void useCameraNormal();
80 
84  void setUserXAxis();
85  void setUserYAxis();
86  void setUserZAxis();
87 
88 protected Q_SLOTS:
92  void placeWidget() override;
93 
94 private Q_SLOTS:
95  void setOrigin(double x, double y, double z);
96  void setNormal(double x, double y, double z);
97  void setDirection(double x, double y, double z);
98  void currentIndexChangedLockAxis(int);
99 
100 protected:
101  void setUserAxis(int axis);
102 
103 Q_SIGNALS:
104  // Note this reports a lock axis (-1, 0, 1, or 2), not a combo-box index (0, 1, 2, 3)
105  void lockedAxisChangedByUser(int);
106 
107 private:
108  Q_DISABLE_COPY(pqCoordinateFramePropertyWidget)
109 };
110 
111 #endif
pqCoordinateFramePropertyWidget is a custom property widget that uses "CoordinateFrameWidgetRepresent...
void useXNormal()
Set the widget normal to be along the X axis.
#define PQAPPLICATIONCOMPONENTS_EXPORT
void useZNormal()
Set the widget normal to be along the Z axis.
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.
void useYNormal()
Set the widget normal to be along the Y axis.
pqInteractivePropertyWidget is an abstract pqPropertyWidget subclass designed to serve as the supercl...