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>
41 class pqMainWindowCore;
43 class PVGUI_Module : public SalomeApp_Module
79 //SelectCellsThroughId,
80 //SelectPointsThroughId,
103 // AnimationInspectorId,
105 // ComparativeViewInspectorId,
106 // SelectionInspectorId,
107 // LookmarkBrowserId,
108 // LookmarkInspectorId,
109 // ObjectInspectorId,
110 // PipelineBrowserId,
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 QString engineIOR() const;
160 /*! Compares the contents of the window with the given reference image,
161 * 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 getTraceString();
171 void saveTrace(const char* theName);
173 pqServer* getActiveServer();
175 virtual void createPreferences();
178 void onImportFromVisu(QString theEntry);
181 //! Initialize ParaView if not yet done (once per session)
182 static bool pvInit();
184 //! Create actions for ParaView GUI operations
185 void pvCreateActions();
187 //! Create menus for ParaView GUI operations duplicating menus in pqMainWindow ParaView class
188 void pvCreateMenus();
190 //! Create toolbars for ParaView GUI operations duplicating toolbars in pqMainWindow ParaView class
191 void pvCreateToolBars();
193 //! Create dock widgets for ParaView widgets
194 void setupDockWidgets();
196 //! Save states of dockable ParaView widgets
197 void saveDockWidgetsState();
199 //! Restore states of dockable ParaView widgets
200 void restoreDockWidgetsState();
202 //! Shows or hides ParaView view window
203 void showView( bool );
205 //! Returns QMenu object for a given menu id
206 QMenu* getMenu( const int );
208 void deleteTemporaryFiles();
210 QList<QToolBar*> getParaViewToolbars();
214 void showHelpForProxy( const QString& proxy );
218 void endWaitCursor();
220 void activateTrace();
222 void buildToolbarsMenu();
224 void showParaViewHelp();
225 void showHelp(const QString& url);
228 virtual bool activateModule( SUIT_Study* );
229 virtual bool deactivateModule( SUIT_Study* );
230 virtual void onApplicationClosed( SUIT_Application* );
233 class pqImplementation;
234 pqImplementation* Implementation;
236 int mySelectionControlsTb;
239 int myToolbarsMenuId;
242 QList<QDockWidget*> myDockWidgets;
244 QStringList myTemporaryFiles;
246 QMap<QToolBar*, bool> myToolbarState;
248 QtMsgHandler myOldMsgHandler;
251 #endif // PVGUI_Module_H