Salome HOME
22224d7210d7608406d357093d50ab3c6a70dc9f
[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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
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 <map>
35 #include <set>
36
37 class SUIT_ViewManager;
38 class SVTK_ViewWindow;
39 class Prs3d_i;
40
41 namespace VISU{
42 typedef std::pair<Prs3d_i*,int> TPrs3dToInd; // prs pointer and default index of scalar bar placement
43 typedef std::set<TPrs3dToInd> TSetPrs3d;
44 typedef std::map<SVTK_ViewWindow*,TSetPrs3d> TViewToPrs3d;
45 }
46
47 class VisuGUI: public SalomeApp_Module
48 {
49   Q_OBJECT;
50
51 public:
52
53   VisuGUI();
54   virtual ~VisuGUI();
55
56   virtual LightApp_Displayer*    displayer();
57   virtual void initialize( CAM_Application* );
58   virtual void windows( QMap<int, int>& ) const;
59   virtual void viewManagers( QStringList& ) const;
60
61   virtual QString engineIOR() const;
62
63   virtual void  studyActivated();
64
65   virtual void  contextMenuPopup( const QString& theClient, QPopupMenu* theMenu, QString& theTitle );
66
67   virtual void createPreferences();
68   virtual void preferencesChanged( const QString&, const QString& );
69
70   virtual
71   SUIT_ViewManager*
72   getViewManager(const QString& theType, 
73                  const bool theIsCreate);
74
75   VISU::TViewToPrs3d getScalarBarsMap();
76   VISU::TViewToPrs3d myScalarBarsMap;
77   
78 public slots:
79   virtual bool deactivateModule( SUIT_Study* );
80   virtual bool activateModule( SUIT_Study* );
81
82 protected slots:
83   void OnImportFromFile();
84   void OnExploreMEDFile();
85   void OnImportTableFromFile();
86   void OnExportTableToFile();
87   void OnImportMedField();
88
89   void OnCreateMesh();
90   void OnCreateScalarMap();
91   void OnCreateDeformedShape();
92   void OnCreateVectors();
93   void OnCreateIsoSurfaces();
94   void OnCreateCutPlanes();
95   void OnCreateCutLines();
96   void OnCreateStreamLines();
97   void OnCreatePlot3D();
98   void OnCreateManyMesh();
99   void OnCreatePlot2dView();
100   void OnCreateScalarMapOnDeformedShape();
101
102   void OnEditScalarMap();
103   void OnEditDeformedShape();
104   void OnEditCutPlanes();
105   void OnEditCutLines();
106   void OnEditIsoSurfaces();
107   void OnEditVectors();
108   void OnEditStreamLines();
109   void OnEditPlot3D();
110   void OnEditScalarMapOnDeformedShape();
111
112   virtual void OnDisplayPrs();
113   virtual void OnDisplayOnlyPrs();
114   virtual void OnErasePrs();
115   virtual void OnEraseAll();
116
117   void OnMakeSurfaceframe();
118   void OnMakeInsideframe();
119   void OnMakeWireframe();
120   void OnMakeSurface();
121   void OnMakePoints();
122   void OnMakeShrink();
123
124   void OnSetShadingOn();
125   void OnSetShadingOff();
126
127   void OnChangeColor();
128   void OnChangeWireframeColor();
129   void OnChangeOpacity();
130   void OnChangeLines();
131
132   void OnShowTable();
133   void OnCreateTable();
134   void OnDeleteObjects();
135   void OnPlotData();
136   void OnCurveProperties();
137   void OnClearContainer();
138   void OnEditContainer();
139
140   void OnMergeScalarBars();
141   void OnFreeScalarBars();
142
143   virtual void OnSaveViewParams();
144   virtual void OnRestoreViewParams();
145
146   void OnRename();
147   void OnClippingPlanes();
148   void OnSweep();
149   void OnTimeAnimation();
150   void OnShowAnimation();
151
152   void OnCopyPresentation();
153
154   void OnSelectionInfo();
155
156   void OnTranslatePrs();
157   void OnArrangeActors();
158
159 protected:
160   virtual LightApp_Selection* createSelection() const;
161
162 private:
163   void createActions();
164   void createMenus();
165   void createToolBars();
166   void createPopupMenus();
167
168 private:
169   LightApp_Displayer*  myDisplayer;
170 };
171
172 #endif