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 <SalomeApp_Module.h>
36 //class LightApp_Selection;
37 //class LightApp_SelectionMgr;
38 class PVGUI_ProcessModuleHelper;
43 class pqMainWindowCore;
45 class PVGUI_Module : public SalomeApp_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 virtual QString engineIOR() const;
162 //! Compares the contents of the window with the given reference image, returns true if they "match" within some tolerance
163 bool compareView( const QString& ReferenceImage, double Threshold,
164 std::ostream& Output, const QString& TempDirectory );
166 void openFile(const char* theName);
167 void saveParaviewState(const char* theFileName);
168 void loadParaviewState(const char* theFileName);
170 QString printTrace();
171 void saveTrace(const char* theName);
173 pqServer* getActiveServer();
175 virtual void createPreferences();
178 void onImportFromVisu(QString theEntry);
181 //virtual CAM_DataModel* createDataModel();
184 //! Initialize ParaView if not yet done (once per session)
185 static bool pvInit();
186 //! Shutdown ParaView, should be called on application exit
187 static void pvShutdown();
189 //! Create actions for ParaView GUI operations
190 void pvCreateActions();
192 //! Create menus for ParaView GUI operations duplicating menus in pqMainWindow ParaView class
193 void pvCreateMenus();
195 //! Create toolbars for ParaView GUI operations duplicating toolbars in pqMainWindow ParaView class
196 void pvCreateToolBars();
198 //! Create dock widgets for ParaView widgets
199 void setupDockWidgets();
201 //! Create dock widgets context menus
202 void setupDockWidgetsContextMenu();
204 //! Save states of dockable ParaView widgets
205 void saveDockWidgetsState();
207 //! Restore states of dockable ParaView widgets
208 void restoreDockWidgetsState();
210 //! Shows or hides ParaView view window
211 void showView( bool );
213 //! Returns QMenu object for a given menu id
214 QMenu* getMenu( const int );
216 void deleteTemporaryFiles();
219 void onUndoLabel( const QString& );
220 void onRedoLabel( const QString& );
222 void onCameraUndoLabel( const QString& );
223 void onCameraRedoLabel( const QString& );
227 void onSelectionModeChanged( int mode );
229 void onShowCenterAxisChanged( bool );
231 void setTimeRanges( double, double );
233 void onPlaying( bool );
235 void onAddCameraLink();
239 void onParaViewHelp();
241 void showHelpForProxy( const QString& proxy );
242 void makeAssistant();
243 void assistantError( const QString& err );
247 void endWaitCursor();
249 void connectToPlay();
253 void activateTrace();
256 virtual bool activateModule( SUIT_Study* );
257 virtual bool deactivateModule( SUIT_Study* );
258 virtual void onApplicationClosed( SUIT_Application* );
261 class pqImplementation;
262 pqImplementation* Implementation;
264 int mySelectionControlsTb;
268 QList<QDockWidget*> myDockWidgets;
270 QStringList myTemporaryFiles;
273 #endif // PVGUI_Module_H