1 // VISU VISUGUI : GUI of VISU component
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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : VisuGUI_Module.h
28 #ifndef VisuGUI_Module_HeaderFile
29 #define VisuGUI_Module_HeaderFile
32 #include "STD_Application.h"
33 #include "SALOMEDSClient_SObject.hxx"
35 class SUIT_ViewManager;
36 class SVTK_ViewManager;
37 class SVTK_ViewWindow;
39 #include "MED_SharedPtr.hxx"
44 typedef MED::SharedPtr<Viewer> PViewer;
46 typedef std::map<SUIT_ViewManager*,PViewer> TViewerMap;
49 //! This class inherits base VisuGUI.
50 /*! Used to display, erase end edit presentations in the VVTK viewer. */
51 class VisuGUI_Module: public VisuGUI
55 friend class VISU::Viewer;
65 eventFilter( QObject * theWatched, QEvent * theEvent );
67 //! Redifined method of the module initializing.
70 initialize( CAM_Application* );
72 //! Redefined method of creating prefernces.
79 preferencesChanged( const QString&, const QString& );
83 getViewManager(const QString& theType,
84 const bool theIsCreate);
88 storeVisualParameters(int savePoint);
92 restoreVisualParameters(int savePoint);
95 //! Reimplemented method of the module deactivation.
98 deactivateModule( SUIT_Study* );
100 //! Reimplemented method of the module activation.
103 activateModule( SUIT_Study* );
106 //! Create preferences for Gauss Points presentation.
109 createGaussPointsPreferences();
111 //! Create preferences for Outside Cursor Gauss Points presentations.
114 createInsideCursorPreferences();
118 createOutsideCursorPreferences();
120 //! Create preferences for Picking.
123 createPickingPreferences();
125 //! Create preferences for Space Mouse.
128 createSpaceMousePreferences();
130 //! Create preferences for Recorder.
133 createRecorderPreferences();
137 onCreateViewManager();
140 onLastViewClosed(SUIT_ViewManager*);
143 OnCreateGaussPoints();
146 OnViewCreated(SUIT_ViewWindow*);
149 OnViewManagerAdded(SUIT_ViewManager*);
151 //! Reimplemented method of the Gauss Points edition.
156 //! Virtual method of saving configuration.
159 OnSaveConfiguration();
161 //! Virtual method of overwriting configuration.
164 OnOverwriteConfiguration();
166 //! Virtual method of restoring configuration.
169 OnRestoreConfiguration();
172 VISU::TViewerMap myViewerMap;
173 _PTR(SObject) myConfigSObject;
175 void setProperty( SVTK_ViewWindow*, const QString& ); // set a property (speed_increment, etc ) for SVTK ViewWindow
176 void setProperty( SVTK_ViewManager*, const QString& ); // set a property for SVTK ViewWindow // set only 1 property for all ViewWindows of given view manager