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 
23 {
24  Q_OBJECT
25  typedef QObject Superclass;
26 
27 public:
29  {
32  CoordinatesAndNormal
33  };
34 
35  pqPointPickingHelper(const QKeySequence& keySequence, bool pick_on_mesh,
36  pqPropertyWidget* parent = nullptr, PickOption pickOpt = Coordinates,
37  bool pickCameraFocalInfo = false);
38  ~pqPointPickingHelper() override;
39 
46  bool pickOnMesh() const { return this->PickOnMesh; }
47 
51  PickOption getPickOption() const { return this->PickOpt; }
52 
56  bool pickCameraFocalInfo() const { return this->PickCameraFocalInfo; }
57 
58 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
63  void setView(pqView* view);
64 
65 Q_SIGNALS:
66  void pick(double x, double y, double z);
67  void pickNormal(double px, double py, double pz, double nx, double ny, double nz);
68 
69 private Q_SLOTS:
70  void pickPoint();
71 
72 private: // NOLINT(readability-redundant-access-specifiers)
73  Q_DISABLE_COPY(pqPointPickingHelper)
74  QPointer<pqRenderView> View;
75  bool PickOnMesh;
76  PickOption PickOpt;
77  bool PickCameraFocalInfo;
78  QPointer<pqModalShortcut> Shortcut;
79 };
80 
81 #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.