]> SALOME platform Git repositories - modules/visu.git/blob - src/VISUGUI/VisuGUI.h
Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/visu.git] / src / VISUGUI / VisuGUI.h
1 //  VISU VISUGUI : GUI of VISU component
2 //
3 //  Copyright (C) 2003  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 //
24 //  File   : VisuGUI.h
25 //  Author : Laurent CORNABE & Hubert ROLLAND
26 //  Module : VISU
27 //  $Header$
28
29 #ifndef VisuGUI_HeaderFile
30 #define VisuGUI_HeaderFile
31
32 #include "SalomeApp_Module.h"
33
34 #include "SALOME_ListIO.hxx"
35 #include "VISU_Prs3d_i.hh"
36 #include "SVTK_ViewWindow.h"
37
38 #include <map>
39 #include <set>
40
41 class SUIT_ViewManager;
42 class SVTK_ViewWindow;
43 class Prs3d_i;
44
45 namespace VISU
46 {
47   typedef std::pair<Prs3d_i*,int> TPrs3dToInd; // prs pointer and default index of scalar bar placement
48   typedef std::set<TPrs3dToInd> TSetPrs3d;
49   typedef std::map<SVTK_ViewWindow*,TSetPrs3d> TViewToPrs3d;
50 }
51
52 class VisuGUI: public SalomeApp_Module
53 {
54   Q_OBJECT;
55
56 public:
57
58   VisuGUI();
59   virtual ~VisuGUI();
60
61   virtual LightApp_Displayer*    displayer();
62   virtual void initialize( CAM_Application* );
63   virtual void windows( QMap<int, int>& ) const;
64   virtual void viewManagers( QStringList& ) const;
65
66   virtual QString engineIOR() const;
67
68   virtual void  studyActivated();
69
70   virtual void  contextMenuPopup( const QString& theClient, QPopupMenu* theMenu, QString& theTitle );
71
72   virtual void createPreferences();
73   virtual void preferencesChanged( const QString&, const QString& );
74
75   virtual
76   SUIT_ViewManager*
77   getViewManager(const QString& theType, 
78                  const bool theIsCreate);
79
80   VISU::TViewToPrs3d&
81   getScalarBarsMap();
82   
83 public slots:
84   virtual bool deactivateModule( SUIT_Study* );
85   virtual bool activateModule( SUIT_Study* );
86   virtual void OnEraseAll();
87
88 protected slots:
89   void OnImportFromFile();
90   void OnImportTableFromFile();
91   void OnExportTableToFile();
92   void OnImportMedField();
93
94   void OnLoadComponentData();
95
96   void OnCreateMesh();
97   void OnCreateScalarMap();
98   void OnCreateDeformedShape();
99   void OnCreateVectors();
100   void OnCreateIsoSurfaces();
101   void OnCreateCutPlanes();
102   void OnCreateCutLines();
103   void OnCreateStreamLines();
104   void OnCreatePlot3D();
105   void OnCreateManyMesh();
106   void OnCreatePlot2dView();
107   void OnCreateScalarMapOnDeformedShape();
108
109   void OnEditScalarMap();
110   void OnEditDeformedShape();
111   void OnEditCutPlanes();
112   void OnEditCutLines();
113   void OnEditIsoSurfaces();
114   void OnEditVectors();
115   void OnEditStreamLines();
116   void OnEditPlot3D();
117   void OnEditScalarMapOnDeformedShape();
118
119   virtual void OnDisplayPrs();
120   virtual void OnDisplayOnlyPrs();
121   virtual void OnErasePrs();
122   //  virtual void OnEraseAll();
123
124   void OnMakeSurfaceframe();
125   void OnMakeInsideframe();
126   void OnMakeWireframe();
127   void OnMakeSurface();
128   void OnMakePoints();
129   void OnMakeShrink();
130
131   void OnSetShadingOn();
132   void OnSetShadingOff();
133
134   void OnChangeColor();
135   void OnChangeWireframeColor();
136   void OnChangeOpacity();
137   void OnChangeLines();
138
139   void OnShowTable();
140   void OnCreateTable();
141   void OnDeleteObjects();
142   void OnPlotData();
143   void OnCurveProperties();
144   void OnClearContainer();
145   void OnEditContainer();
146
147   void OnMergeScalarBars();
148   void OnFreeScalarBars();
149
150   virtual void OnSaveViewParams();
151   virtual void OnRestoreViewParams();
152
153   void OnRename();
154   void OnClippingPlanes();
155   void OnSweep();
156   void OnParallelTimeAnimation();
157   void OnSucccessiveTimeAnimation();
158   void OnShowAnimation();
159
160   void OnCopyPresentation();
161
162   void OnSelectionInfo();
163
164   void OnTranslatePrs();
165   void OnArrangeActors();
166   void OnPlot3dFromCutPlane();
167
168   void OnCacheProperties();
169
170   // MULTIPR
171   void OnMultiprViewFullRes();
172   void OnMultiprViewMediumRes();
173   void OnMultiprViewLowRes();
174   void OnMultiprViewHide();
175   void OnMultiprChangeRes(VISU::Result::Resolution theResolution);
176
177 protected:
178   virtual LightApp_Selection* createSelection() const;
179
180   void OnTimeAnimation(VISU::Animation::AnimationMode theMode);
181
182 private:
183   void createActions();
184   void createMenus();
185   void createToolBars();
186   void createPopupMenus();
187
188 private:
189   LightApp_Displayer* myDisplayer;
190   VISU::TViewToPrs3d myScalarBarsMap;
191 };
192
193 #endif