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.
31 A link to the file documentation PVGUI_Module_actions.cxx
33 A link to the file documentation PVGUI_Module_impl.h
35 A link to the class documentation PVGUI_Module
37 The class name as a text (not a link to its documentation) %PVGUI_Module
39 A link to the constructor of the class PVGUI_ViewWindow#PVGUI_ViewWindow or PVGUI_Module::PVGUI_Module()
41 A link to the destructor of the class PVGUI_ViewWindow#~PVGUI_ViewWindow
43 A link to the member function PVGUI_ViewWindow::getVisualParameters or PVGUI_ViewWindow#getVisualParameters
45 Arguments of a function should be specified only for the overloaded functions PVGUI_Module::initialize(CAM_Application*)
47 A link to some enumeration values PVGUI_Module::OpenFileId and PVGUI_Module::CreateLookmarkId
49 A link to a protected member variable of the class PVGUI_ViewWindow#myModel
51 A link to a variable \link PVGUI_ViewWindow#myModel using another text\endlink as a link
55 #ifndef PVGUI_Module_H
56 #define PVGUI_Module_H
58 #include <LightApp_Module.h>
64 class LightApp_Selection;
65 class LightApp_SelectionMgr;
66 class PVGUI_ProcessModuleHelper;
73 class PVGUI_Module : public LightApp_Module
108 SelectCellsThroughId,
109 SelectPointsThroughId,
131 AnimationInspectorId,
133 ComparativeViewInspectorId,
134 SelectionInspectorId,
156 CreateCustomFilterId,
157 ManageCustomFiltersId,
161 ManagePluginsExtensionsId,
164 RecordTestScreenshotId,
177 lgLoadFile = 931, //!< load text file
178 lgSaveFile, //!< save text file
179 lgDisplayLine, //!< display selected line
180 lgEraseLine, //!< erase selected line
181 lgEditLine, //!< edit selected line
182 lgAddLine, //!< insert new line
183 lgDelLine, //!< delete selected line
184 lgClear //!< clear all contents
192 virtual void initialize( CAM_Application* );
193 virtual void windows( QMap<int, int>& ) const;
195 //virtual LightApp_Selection* createSelection() const;
197 pqViewManager* getMultiViewManager() const;
199 virtual bool eventFilter( QObject*, QEvent* );
201 //! Compares the contents of the window with the given reference image, returns true if they "match" within some tolerance
202 bool compareView( const QString& ReferenceImage, double Threshold,
203 ostream& Output, const QString& TempDirectory );
206 //virtual CAM_DataModel* createDataModel();
209 //! Initialize ParaView if not yet done (once per session)
210 static bool pvInit();
211 //! Shutdown ParaView, should be called on application exit
212 static void pvShutdown();
214 //! Create actions for ParaView GUI operations
215 void pvCreateActions();
217 //! Create menus for ParaView GUI operations
218 //! duplicating menus in pqMainWindow ParaView class
219 void pvCreateMenus();
221 //! Create toolbars for ParaView GUI operations
222 //! duplicating toolbars in pqMainWindow ParaView class
223 void pvCreateToolBars();
225 //! Create dock widgets for ParaView widgets
226 void setupDockWidgets();
228 //! Create dock widgets context menus
229 void setupDockWidgetsContextMenu();
231 //! Save states of dockable ParaView widgets
232 void saveDockWidgetsState();
234 //! Restore states of dockable ParaView widgets
235 void restoreDockWidgetsState();
237 //! Shows or hides ParaView view window
238 void showView( bool );
240 //! Returns QMenu object for a given menu id
241 QMenu* getMenu( const int );
244 void onUndoLabel( const QString& );
245 void onRedoLabel( const QString& );
247 void onCameraUndoLabel( const QString& );
248 void onCameraRedoLabel( const QString& );
252 void onSelectionModeChanged( int mode );
254 void onShowCenterAxisChanged( bool );
256 void setTimeRanges( double, double );
258 void onPlaying( bool );
260 void onAddCameraLink();
264 void showHelpForProxy( const QString& proxy );
265 void makeAssistant();
266 void assistantError( const QString& err );
270 void endWaitCursor();
273 virtual bool activateModule( SUIT_Study* );
274 virtual bool deactivateModule( SUIT_Study* );
277 class pqImplementation;
278 pqImplementation* Implementation;
280 int mySelectionControlsTb;
284 QList<QDockWidget*> myDockWidgets;
287 #endif // PVGUI_Module_H