Salome HOME
52ccb9362a1b329fd03ed01890af15518f46ed1f
[modules/visu.git] / src / VISUGUI / VisuGUI_Module.h
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
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.
10 //
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.
15 //
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
19 //
20 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 //  VISU VISUGUI : GUI of VISU component
23 //  File   : VisuGUI_Module.h
24 //  Author : 
25 //  Module : VISU
26 //
27 #ifndef VisuGUI_Module_HeaderFile
28 #define VisuGUI_Module_HeaderFile
29
30 #include "VisuGUI.h"
31 #include "STD_Application.h"
32 #include "SALOMEDSClient_SObject.hxx"
33
34 class SUIT_ViewManager;
35 class SVTK_ViewManager;
36 class SVTK_ViewWindow;
37
38 #include "MED_SharedPtr.hxx"
39
40 //! This class inherits base VisuGUI.
41 /*! Used to display, erase end edit presentations in the VVTK viewer. */
42 class VisuGUI_Module: public VisuGUI
43 {
44   Q_OBJECT;
45
46 public:
47   VisuGUI_Module();
48
49   virtual
50   ~VisuGUI_Module();
51
52   //  virtual
53   //  bool
54   //  eventFilter( QObject * theWatched, QEvent * theEvent );
55
56   //! Redifined method of the module initializing.
57   virtual
58   void
59   initialize( CAM_Application* );
60
61   //! Redefined method of creating prefernces.
62   virtual 
63   void 
64   createPreferences();
65
66   virtual
67   void
68   preferencesChanged( const QString&, const QString& );
69
70   virtual
71   SUIT_ViewManager*
72   getViewManager(const QString& theType, 
73                  const bool theIsCreate);
74
75   virtual 
76   void
77   storeVisualParameters(int savePoint);
78   
79   virtual
80   void
81   restoreVisualParameters(int savePoint);
82
83   //public slots:
84   //! Reimplemented method of the module deactivation.
85   //  virtual bool deactivateModule( SUIT_Study* );
86
87   //! Reimplemented method of the module activation.
88   //  virtual bool activateModule( SUIT_Study* );
89
90 protected:
91   //! Create preferences for Gauss Points presentation.
92   virtual 
93   void 
94   createGaussPointsPreferences();
95
96   //! Create preferences for Outside Cursor Gauss Points presentations.
97   virtual 
98   void 
99   createInsideCursorPreferences();
100
101   virtual 
102   void 
103   createOutsideCursorPreferences();
104
105   //! Create preferences for Picking.
106   virtual 
107   void 
108   createPickingPreferences();
109
110   //! Create preferences for Space Mouse.
111   virtual 
112   void 
113   createSpaceMousePreferences();
114
115   //! Create preferences for Recorder.
116   virtual 
117   void 
118   createRecorderPreferences();
119
120 protected slots:
121   //  SUIT_ViewManager*
122   //  onCreateViewManager();
123
124   void
125   OnCreateGaussPoints();
126
127   void
128   OnViewCreated(SUIT_ViewWindow*);
129
130   //  void 
131   //OnViewManagerAdded(SUIT_ViewManager*);
132
133   //! Reimplemented method of the Gauss Points edition.
134   virtual
135   void
136   OnEditGaussPoints();
137
138   //! Virtual method of saving configuration.
139   //  virtual
140   //  void
141   //  OnSaveConfiguration();
142
143   //! Virtual method of overwriting configuration.
144   //  virtual
145   //  void
146   //  OnOverwriteConfiguration();
147
148   //! Virtual method of restoring configuration.
149   //  virtual
150   //  void
151   //  OnRestoreConfiguration();
152
153 protected:
154   _PTR(SObject) myConfigSObject;
155
156   void setProperty( SVTK_ViewWindow*, const QString& );  // set a property (speed_increment, etc ) for SVTK ViewWindow
157   void setProperty( SVTK_ViewManager*, const QString& ); // set a property for SVTK ViewWindow // set only 1 property for all ViewWindows of given view manager
158
159 };
160
161 #endif