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
29 Insert the content of introduction page here.
33 #ifndef PVGUI_Module_H
34 #define PVGUI_Module_H
36 #include <LightApp_Module.h>
42 class LightApp_Selection;
43 class LightApp_SelectionMgr;
44 class PVGUI_ProcessModuleHelper;
51 class PVGUI_Module : public LightApp_Module
87 SelectPointsThroughId,
109 AnimationInspectorId,
111 ComparativeViewInspectorId,
112 SelectionInspectorId,
134 CreateCustomFilterId,
135 ManageCustomFiltersId,
139 ManagePluginsExtensionsId,
142 RecordTestScreenshotId,
155 lgLoadFile = 931, //!< load text file
156 lgSaveFile, //!< save text file
157 lgDisplayLine, //!< display selected line
158 lgEraseLine, //!< erase selected line
159 lgEditLine, //!< edit selected line
160 lgAddLine, //!< insert new line
161 lgDelLine, //!< delete selected line
162 lgClear //!< clear all contents
170 virtual void initialize( CAM_Application* );
171 virtual void windows( QMap<int, int>& ) const;
173 //virtual LightApp_Selection* createSelection() const;
175 pqViewManager* getMultiViewManager() const;
177 virtual bool eventFilter( QObject*, QEvent* );
179 //! Compares the contents of the window with the given reference image, returns true if they "match" within some tolerance
180 bool compareView( const QString& ReferenceImage, double Threshold,
181 ostream& Output, const QString& TempDirectory );
184 //virtual CAM_DataModel* createDataModel();
187 //! Initialize ParaView if not yet done (once per session)
188 static bool pvInit();
189 //! Shutdown ParaView, should be called on application exit
190 static void pvShutdown();
192 //! Create actions for ParaView GUI operations
193 void pvCreateActions();
195 //! Create menus for ParaView GUI operations
196 //! duplicating menus in pqMainWindow ParaView class
197 void pvCreateMenus();
199 //! Create toolbars for ParaView GUI operations
200 //! duplicating toolbars in pqMainWindow ParaView class
201 void pvCreateToolBars();
203 //! Create dock widgets for ParaView widgets
204 void setupDockWidgets();
206 //! Create dock widgets context menus
207 void setupDockWidgetsContextMenu();
209 //! Save states of dockable ParaView widgets
210 void saveDockWidgetsState();
212 //! Restore states of dockable ParaView widgets
213 void restoreDockWidgetsState();
215 //! Shows or hides ParaView view window
216 void showView( bool );
218 //! Returns QMenu object for a given menu id
219 QMenu* getMenu( const int );
222 void onUndoLabel( const QString& );
223 void onRedoLabel( const QString& );
225 void onCameraUndoLabel( const QString& );
226 void onCameraRedoLabel( const QString& );
230 void onSelectionModeChanged( int mode );
232 void onShowCenterAxisChanged( bool );
234 void setTimeRanges( double, double );
236 void onPlaying( bool );
238 void onAddCameraLink();
242 void showHelpForProxy( const QString& proxy );
243 void makeAssistant();
244 void assistantError( const QString& err );
248 void endWaitCursor();
251 virtual bool activateModule( SUIT_Study* );
252 virtual bool deactivateModule( SUIT_Study* );
255 class pqImplementation;
256 pqImplementation* Implementation;
258 int mySelectionControlsTb;
262 QList<QDockWidget*> myDockWidgets;
265 #endif // PVGUI_Module_H