pqStandardViewFrameActionsImplementation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: pqStandardViewFrameActionsImplementation.h
5 
6  Copyright (c) 2005,2006 Sandia Corporation, Kitware Inc.
7  All rights reserved.
8 
9  ParaView is a free software; you can redistribute it and/or modify it
10  under the terms of the ParaView license version 1.2.
11 
12  See License_v1.2.txt for the full ParaView license.
13  A copy of this license can be obtained by contacting
14  Kitware Inc.
15  28 Corporate Drive
16  Clifton Park, NY 12065
17  USA
18 
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
23 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 
31 ========================================================================*/
32 #ifndef pqStandardViewFrameActionsImplementation_h
33 #define pqStandardViewFrameActionsImplementation_h
34 
35 #include "pqApplicationComponentsModule.h" // needed for export macros
37 #include <QObject> // needed for QObject
38 #include <QPointer> // needed for QPointer
39 
40 class pqContextView;
41 class pqRenderView;
42 class pqSpreadSheetView;
43 class pqView;
44 class QAction;
45 class QActionGroup;
46 class QShortcut;
47 class QWidget;
48 
90  : public QObject,
92 {
93  Q_OBJECT
94  Q_INTERFACES(pqViewFrameActionsInterface);
95 
96 public:
97  pqStandardViewFrameActionsImplementation(QObject* parent = 0);
99 
105  void frameConnected(pqViewFrame* frame, pqView* view) override;
106 
107 protected Q_SLOTS:
112  void aboutToShowConvertMenu();
113 
117  void selectSurfaceCellsTriggered();
118  void selectSurfacePointsTriggered();
119  void selectFrustumCellsTriggered();
120  void selectFrustumPointsTriggered();
121  void selectBlocksTriggered();
122  void escTriggered();
123 
129  void manageGroupExclusivity(QAction*);
130 
134  void escapeableActionToggled(bool checked);
135 
139  void interactiveSelectionToggled(bool checked);
140 
144  void captureViewTriggered();
145 
146 protected:
150  virtual void setupEmptyFrame(QWidget* frame);
151 
155  virtual void addGenericActions(pqViewFrame* frame, pqView* view);
156 
160  virtual QActionGroup* addSelectionModifierActions(pqViewFrame* frame, pqView* view);
161 
165  virtual void addSeparator(pqViewFrame* frame, pqView* view);
166 
170  virtual void addContextViewActions(pqViewFrame* frame, pqContextView* chart_view);
171 
175  virtual void addRenderViewActions(pqViewFrame* frame, pqRenderView* view);
176 
180  virtual void addSpreadSheetViewActions(pqViewFrame* frame, pqSpreadSheetView* view);
181 
186  virtual bool isButtonVisible(const std::string& buttonName, pqView* view);
187 
188  struct ViewType
189  {
190  QString Label;
191  QString Name;
192  ViewType() {}
193  ViewType(const QString& label, const QString& name)
194  : Label(label)
195  , Name(name)
196  {
197  }
198  };
199 
204  virtual QList<ViewType> availableViewTypes();
205 
210  virtual pqView* handleCreateView(const ViewType& viewType);
211 
216  void invoked(pqViewFrame*, const ViewType& type, const QString& command);
217 
218 private:
220  QPointer<QShortcut> ShortCutSurfaceCells;
221  QPointer<QShortcut> ShortCutSurfacePoints;
222  QPointer<QShortcut> ShortCutFrustumCells;
223  QPointer<QShortcut> ShortCutFrustumPoints;
224  QPointer<QShortcut> ShortCutBlocks;
225  QPointer<QShortcut> ShortCutEsc;
226  QPointer<QShortcut> ShortCutGrow;
227  QPointer<QShortcut> ShortCutShrink;
228  static bool ViewTypeComparator(const ViewType& one, const ViewType& two);
229 };
230 
231 #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:59
pqContextView is an abstract base class for all charting views based on the VTK context charting libr...
Definition: pqContextView.h:47
#define PQAPPLICATIONCOMPONENTS_EXPORT
This is a PQ abstraction of a generic view module.
Definition: pqView.h:54
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.