ParaView
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 QAction;
44 class QActionGroup;
45 class QShortcut;
46 class QWidget;
47 
86 class PQAPPLICATIONCOMPONENTS_EXPORT pqStandardViewFrameActionsImplementation :
87  public QObject,
89 {
90  Q_OBJECT
91  Q_INTERFACES(pqViewFrameActionsInterface);
92 public:
95 
99  virtual void frameConnected(pqViewFrame* frame, pqView* view);
100 
101 protected slots:
104  void aboutToShowConvertMenu();
105 
108  void invoked();
109 
111  void selectSurfaceCellsTriggered();
112  void selectSurfacePointsTriggered();
113  void selectFrustumCellsTriggered();
114  void selectFrustumPointsTriggered();
115  void selectBlocksTriggered();
116  void escTriggered();
117 
121  void manageGroupExclusivity(QAction*);
122 
124  void escapeableActionToggled(bool checked);
125 
127  void interactiveSelectionToggled(bool checked);
128 
129 protected:
131  virtual void setupEmptyFrame(QWidget* frame);
132 
134  virtual void addGenericActions(pqViewFrame* frame, pqView* view);
135 
137  virtual QActionGroup* addSelectionModifierActions(pqViewFrame* frame, pqView* view);
138 
140  virtual void addSeparator(pqViewFrame* frame, pqView* view);
141 
143  virtual void addContextViewActions(pqViewFrame* frame, pqContextView* chart_view);
144 
146  virtual void addRenderViewActions(pqViewFrame *frame, pqRenderView* view);
147 
149  virtual void addSpreadSheetViewActions(pqViewFrame* frame, pqSpreadSheetView* view);
150 
153  virtual bool isButtonVisible(const std::string & buttonName, pqView* view);
154 
155  struct ViewType
156  {
157  QString Label;
158  QString Name;
160  ViewType(const QString& label, const QString& name):
161  Label(label), Name(name)
162  {
163  }
164  };
165 
168  virtual QList<ViewType> availableViewTypes();
169 
172  virtual void handleCreateView(const ViewType& viewType);
173 
174 private:
176  QPointer<QShortcut> ShortCutSurfaceCells;
177  QPointer<QShortcut> ShortCutSurfacePoints;
178  QPointer<QShortcut> ShortCutFrustumCells;
179  QPointer<QShortcut> ShortCutFrustumPoints;
180  QPointer<QShortcut> ShortCutBlocks;
181  QPointer<QShortcut> ShortCutEsc;
182  static bool ViewTypeComparator(const ViewType& one, const ViewType& two);
183 };
184 
185 #endif
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:57
pqContextView is an abstract base class for all charting views based on the VTK context charting libr...
Definition: pqContextView.h:45
This is a PQ abstraction of a generic view module.
Definition: pqView.h:55
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.