Salome HOME
Join modifications from branch OCC_development_for_3_2_0a2
[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 OnImportTableFromFile();
85   void OnExportTableToFile();
86   void OnImportMedField();
87
88   void OnCreateMesh();
89   void OnCreateScalarMap();
90   void OnCreateDeformedShape();
91   void OnCreateVectors();
92   void OnCreateIsoSurfaces();
93   void OnCreateCutPlanes();
94   void OnCreateCutLines();
95   void OnCreateStreamLines();
96   void OnCreatePlot3D();
97   void OnCreateManyMesh();
98   void OnCreatePlot2dView();
99   void OnCreateScalarMapOnDeformedShape();
100
101   void OnEditScalarMap();
102   void OnEditDeformedShape();
103   void OnEditCutPlanes();
104   void OnEditCutLines();
105   void OnEditIsoSurfaces();
106   void OnEditVectors();
107   void OnEditStreamLines();
108   void OnEditPlot3D();
109   void OnEditScalarMapOnDeformedShape();
110
111   virtual void OnDisplayPrs();
112   virtual void OnDisplayOnlyPrs();
113   virtual void OnErasePrs();
114   virtual void OnEraseAll();
115
116   void OnMakeSurfaceframe();
117   void OnMakeInsideframe();
118   void OnMakeWireframe();
119   void OnMakeSurface();
120   void OnMakePoints();
121   void OnMakeShrink();
122
123   void OnSetShadingOn();
124   void OnSetShadingOff();
125
126   void OnChangeColor();
127   void OnChangeWireframeColor();
128   void OnChangeOpacity();
129   void OnChangeLines();
130
131   void OnShowTable();
132   void OnCreateTable();
133   void OnDeleteObjects();
134   void OnPlotData();
135   void OnCurveProperties();
136   void OnClearContainer();
137   void OnEditContainer();
138
139   void OnMergeScalarBars();
140   void OnFreeScalarBars();
141
142   virtual void OnSaveViewParams();
143   virtual void OnRestoreViewParams();
144
145   void OnRename();
146   void OnClippingPlanes();
147   void OnSweep();
148   void OnTimeAnimation();
149   void OnShowAnimation();
150
151   void OnCopyPresentation();
152
153   void OnSelectionInfo();
154
155   void OnTranslatePrs();
156   void OnArrangeActors();
157
158 protected:
159   virtual LightApp_Selection* createSelection() const;
160
161 private:
162   void createActions();
163   void createMenus();
164   void createToolBars();
165   void createPopupMenus();
166
167 private:
168   LightApp_Displayer*  myDisplayer;
169 };
170
171 #endif