pqStandardViewFrameActionsImplementation.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 pqStandardViewFrameActionsImplementation_h
5 #define pqStandardViewFrameActionsImplementation_h
6 
7 #include "pqApplicationComponentsModule.h" // needed for export macros
9 #include <QObject> // needed for QObject
10 #include <QPointer> // needed for QPointer
11 
12 class pqContextView;
13 class pqRenderView;
14 class pqSpreadSheetView;
15 class pqView;
16 class QAction;
17 class QActionGroup;
18 class QShortcut;
19 class QWidget;
20 
61  : public QObject
63 {
64  Q_OBJECT
65  Q_INTERFACES(pqViewFrameActionsInterface);
66 
67 public:
68  pqStandardViewFrameActionsImplementation(QObject* parent = nullptr);
70 
76  void frameConnected(pqViewFrame* frame, pqView* view) override;
77 
78 protected Q_SLOTS:
83  void aboutToShowConvertMenu();
84 
88  void selectSurfaceCellsTriggered();
89  void selectSurfacePointsTriggered();
90  void selectFrustumCellsTriggered();
91  void selectFrustumPointsTriggered();
92  void selectBlocksTriggered();
93  void escTriggered();
94 
100  void manageGroupExclusivity(QAction*);
101 
105  void escapeableActionToggled(bool checked);
106 
110  void interactiveSelectionToggled(bool checked);
111 
115  void captureViewTriggered();
116 
117 protected: // NOLINT(readability-redundant-access-specifiers)
121  virtual void setupEmptyFrame(QWidget* frame);
122 
126  virtual void addGenericActions(pqViewFrame* frame, pqView* view);
127 
131  virtual QActionGroup* addSelectionModifierActions(pqViewFrame* frame, pqView* view);
132 
136  virtual void addSeparator(pqViewFrame* frame, pqView* view);
137 
141  virtual void addContextViewActions(pqViewFrame* frame, pqContextView* chart_view);
142 
146  virtual void addRenderViewActions(pqViewFrame* frame, pqRenderView* view);
147 
151  virtual void addSpreadSheetViewActions(pqViewFrame* frame, pqSpreadSheetView* view);
152 
157  virtual bool isButtonVisible(const std::string& buttonName, pqView* view);
158 
159  struct ViewType
160  {
161  QString Label;
162  QString Name;
163  ViewType() = default;
164  ViewType(const QString& label, const QString& name)
165  : Label(label)
166  , Name(name)
167  {
168  }
169  };
170 
175  virtual QList<ViewType> availableViewTypes();
176 
181  virtual pqView* handleCreateView(const ViewType& viewType);
182 
187  void invoked(pqViewFrame*, const ViewType& type, const QString& command);
188 
189 private:
191  QPointer<QShortcut> ShortCutSurfaceCells;
192  QPointer<QShortcut> ShortCutSurfacePoints;
193  QPointer<QShortcut> ShortCutFrustumCells;
194  QPointer<QShortcut> ShortCutFrustumPoints;
195  QPointer<QShortcut> ShortCutBlocks;
196  QPointer<QShortcut> ShortCutEsc;
197  QPointer<QShortcut> ShortCutGrow;
198  QPointer<QShortcut> ShortCutShrink;
199  static bool ViewTypeComparator(const ViewType& one, const ViewType& two);
200 };
201 
202 #endif
type
pqViewFrameActionsInterface is an interface used by pqMultiViewWidget to add actions/toolbuttons to p...
pqViewFrame is used to represent a frame for any ParaView view shown in the pqMultiViewWidget.
Definition: pqViewFrame.h:31
pqContextView is an abstract base class for all charting views based on the VTK context charting libr...
Definition: pqContextView.h:19
#define PQAPPLICATIONCOMPONENTS_EXPORT
This is a PQ abstraction of a generic view module.
Definition: pqView.h:26
View for spread-sheet view.
pqStandardViewFrameActionsImplementation implements pqViewFrameActionsInterface to add the default vi...
virtual void frameConnected(pqViewFrame *frame, pqView *view)=0
This method is called after a frame is assigned to a view.