1 // PARAVIS : ParaView wrapper SALOME module
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : PVGUI_Module.h
23 // Author : Sergey ANIKIN
27 #ifndef PVGUI_Module_H
28 #define PVGUI_Module_H
30 #include <LightApp_Module.h>
36 class LightApp_Selection;
37 class LightApp_SelectionMgr;
38 class PVGUI_ProcessModuleHelper;
45 class PVGUI_Module : public LightApp_Module
81 SelectPointsThroughId,
103 AnimationInspectorId,
105 ComparativeViewInspectorId,
106 SelectionInspectorId,
128 CreateCustomFilterId,
129 ManageCustomFiltersId,
133 ManagePluginsExtensionsId,
136 RecordTestScreenshotId,
153 virtual void initialize( CAM_Application* );
154 virtual void windows( QMap<int, int>& ) const;
156 pqViewManager* getMultiViewManager() const;
158 virtual bool eventFilter( QObject*, QEvent* );
160 //! Compares the contents of the window with the given reference image, returns true if they "match" within some tolerance
161 bool compareView( const QString& ReferenceImage, double Threshold,
162 ostream& Output, const QString& TempDirectory );
165 //virtual CAM_DataModel* createDataModel();
168 //! Initialize ParaView if not yet done (once per session)
169 static bool pvInit();
170 //! Shutdown ParaView, should be called on application exit
171 static void pvShutdown();
173 //! Create actions for ParaView GUI operations
174 void pvCreateActions();
176 //! Create menus for ParaView GUI operations duplicating menus in pqMainWindow ParaView class
177 void pvCreateMenus();
179 //! Create toolbars for ParaView GUI operations duplicating toolbars in pqMainWindow ParaView class
180 void pvCreateToolBars();
182 //! Create dock widgets for ParaView widgets
183 void setupDockWidgets();
185 //! Create dock widgets context menus
186 void setupDockWidgetsContextMenu();
188 //! Save states of dockable ParaView widgets
189 void saveDockWidgetsState();
191 //! Restore states of dockable ParaView widgets
192 void restoreDockWidgetsState();
194 //! Shows or hides ParaView view window
195 void showView( bool );
197 //! Returns QMenu object for a given menu id
198 QMenu* getMenu( const int );
201 void onUndoLabel( const QString& );
202 void onRedoLabel( const QString& );
204 void onCameraUndoLabel( const QString& );
205 void onCameraRedoLabel( const QString& );
209 void onSelectionModeChanged( int mode );
211 void onShowCenterAxisChanged( bool );
213 void setTimeRanges( double, double );
215 void onPlaying( bool );
217 void onAddCameraLink();
221 void showHelpForProxy( const QString& proxy );
222 void makeAssistant();
223 void assistantError( const QString& err );
227 void endWaitCursor();
230 virtual bool activateModule( SUIT_Study* );
231 virtual bool deactivateModule( SUIT_Study* );
234 class pqImplementation;
235 pqImplementation* Implementation;
237 int mySelectionControlsTb;
241 QList<QDockWidget*> myDockWidgets;
244 #endif // PVGUI_Module_H