pqPointPickingHelper.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 pqPointPickingHelper_h
5 #define pqPointPickingHelper_h
6 
8 #include <QKeySequence>
9 #include <QObject>
10 #include <QPointer>
11 
12 class pqModalShortcut;
13 class pqPropertyWidget;
14 class pqRenderView;
15 class pqView;
16 class QShortcut;
17 
24 {
25  Q_OBJECT
26  typedef QObject Superclass;
27 
28 public:
30  {
33  CoordinatesAndNormal
34  };
35 
36  pqPointPickingHelper(const QKeySequence& keySequence, bool pick_on_mesh,
37  pqPropertyWidget* parent = nullptr, PickOption pickOpt = Coordinates,
38  bool pickCameraFocalInfo = false);
39  ~pqPointPickingHelper() override;
40 
47  bool pickOnMesh() const { return this->PickOnMesh; }
48 
52  PickOption getPickOption() const { return this->PickOpt; }
53 
57  bool pickCameraFocalInfo() const { return this->PickCameraFocalInfo; }
58 
59 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
64  void setView(pqView* view);
65 
66 Q_SIGNALS:
67  void pick(double x, double y, double z);
68  void pickNormal(double px, double py, double pz, double nx, double ny, double nz);
69 
70 private Q_SLOTS:
71  void pickPoint();
72 
73 private: // NOLINT(readability-redundant-access-specifiers)
74  Q_DISABLE_COPY(pqPointPickingHelper)
75  QPointer<pqRenderView> View;
76  bool PickOnMesh;
77  PickOption PickOpt;
78  bool PickCameraFocalInfo;
79  QPointer<pqModalShortcut> Shortcut;
80 };
81 
82 #endif
pqPropertyWidget represents a widget created for each property of a proxy on the pqPropertiesPanel (f...
Manage an action and/or widget&#39;s responsivity to a shortcut.
#define PQAPPLICATIONCOMPONENTS_EXPORT
bool pickCameraFocalInfo() const
Returns whether the camera focal point/normal can be returned if the picking on mesh fails...
This is a PQ abstraction of a generic view module.
Definition: pqView.h:26
pqPointPickingHelper is a helper class that is designed for use by subclasses of pqInteractivePropert...
bool pickOnMesh() const
Returns whether the helper will pick a point/normal in the mesh or simply a point/normal on the surfa...
PickOption getPickOption() const
Returns whether the helper will pick a point or a normal.