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