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,
149 lgLoadFile = 931, //!< load text file
150 lgSaveFile, //!< save text file
151 lgDisplayLine, //!< display selected line
152 lgEraseLine, //!< erase selected line
153 lgEditLine, //!< edit selected line
154 lgAddLine, //!< insert new line
155 lgDelLine, //!< delete selected line
156 lgClear //!< clear all contents
164 virtual void initialize( CAM_Application* );
165 virtual void windows( QMap<int, int>& ) const;
167 //virtual LightApp_Selection* createSelection() const;
169 pqViewManager* getMultiViewManager() const;
171 virtual bool eventFilter( QObject*, QEvent* );
173 //! Compares the contents of the window with the given reference image, returns true if they "match" within some tolerance
174 bool compareView( const QString& ReferenceImage, double Threshold,
175 ostream& Output, const QString& TempDirectory );
178 //virtual CAM_DataModel* createDataModel();
181 //! Initialize ParaView if not yet done (once per session)
182 static bool pvInit();
183 //! Shutdown ParaView, should be called on application exit
184 static void pvShutdown();
186 //! Create actions for ParaView GUI operations
187 void pvCreateActions();
189 //! Create menus for ParaView GUI operations
190 //! duplicating menus in pqMainWindow ParaView class
191 void pvCreateMenus();
193 //! Create toolbars for ParaView GUI operations
194 //! duplicating toolbars in pqMainWindow ParaView class
195 void pvCreateToolBars();
197 //! Create dock widgets for ParaView widgets
198 void setupDockWidgets();
200 //! Create dock widgets context menus
201 void setupDockWidgetsContextMenu();
203 //! Save states of dockable ParaView widgets
204 void saveDockWidgetsState();
206 //! Restore states of dockable ParaView widgets
207 void restoreDockWidgetsState();
209 //! Shows or hides ParaView view window
210 void showView( bool );
212 //! Returns QMenu object for a given menu id
213 QMenu* getMenu( const int );
216 void onUndoLabel( const QString& );
217 void onRedoLabel( const QString& );
219 void onCameraUndoLabel( const QString& );
220 void onCameraRedoLabel( const QString& );
224 void onSelectionModeChanged( int mode );
226 void onShowCenterAxisChanged( bool );
228 void setTimeRanges( double, double );
230 void onPlaying( bool );
232 void onAddCameraLink();
236 void showHelpForProxy( const QString& proxy );
237 void makeAssistant();
238 void assistantError( const QString& err );
242 void endWaitCursor();
245 virtual bool activateModule( SUIT_Study* );
246 virtual bool deactivateModule( SUIT_Study* );
249 class pqImplementation;
250 pqImplementation* Implementation;
252 int mySelectionControlsTb;
256 QList<QDockWidget*> myDockWidgets;
259 #endif // PVGUI_Module_H