Salome HOME
IPAL9191: Import MED object from MED Component
[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 "SALOME_InteractiveObject.hxx"
35
36 #include "VISUConfig.hh"
37
38 #include "SALOMEconfig.h"
39 #include CORBA_SERVER_HEADER(SALOMEDS)
40 #include CORBA_SERVER_HEADER(VISU_Gen)
41 #include CORBA_SERVER_HEADER(MED_Gen)
42
43 class SUIT_Desktop;
44
45 namespace VISU{
46   class ScalarMap_i;
47 }
48
49 class VisuGUI: public SalomeApp_Module
50 {
51   Q_OBJECT;
52 public:
53
54   VisuGUI();
55   virtual ~VisuGUI();
56
57   virtual void initialize( CAM_Application* );
58   virtual void windows( QMap<int, int>& ) const;
59   virtual void viewManagers( QStringList& ) const;
60   virtual QString engineIOR() const;
61
62   virtual void  studyActivated();
63
64   virtual void  contextMenuPopup( const QString& theClient, QPopupMenu* theMenu, QString& theTitle );
65
66 public slots:
67   virtual bool deactivateModule( SUIT_Study* );
68   virtual bool activateModule( SUIT_Study* );
69
70 protected slots:
71   void OnImportFromFile();
72   void OnExploreMEDFile();
73   void OnImportTableFromFile();
74   void OnExportTableToFile();
75   void OnImportMedField();
76
77   void OnCreateMesh();
78   void OnCreateScalarMap();
79   void OnCreateDeformedShape();
80   void OnCreateVectors();
81   void OnCreateIsoSurfaces();
82   void OnCreateCutPlanes();
83   void OnCreateCutLines();
84   void OnCreateStreamLines();
85   void OnCreateManyMesh();
86   void OnCreatePlot2dView();
87
88   void OnEditPrs();
89   void OnDeletePrs();
90
91   void OnDisplayPrs();
92   void OnDisplayOnlyPrs();
93   void OnErasePrs();
94   void OnEraseAll();
95
96   void OnMakeSurfaceframe();
97   void OnMakeInsideframe();
98   void OnMakeWireframe();
99   void OnMakeSurface();
100   void OnMakePoints();
101   void OnMakeShrink();
102
103   void OnChangeColor();
104   void OnChangeWireframeColor();
105   void OnChangeOpacity();
106   void OnChangeLines();
107
108   void OnShowTable();
109   void OnCreateTable();
110   void OnDeleteObject();
111   void OnPlotData();
112   void OnCurveProperties();
113   void OnClearContainer();
114   void OnEditContainer();
115
116   void OnSaveViewParams();
117   void OnRestoreViewParams();
118   void OnDeleteViewParams();
119
120   void OnRename();
121   void OnSweep();
122   void OnTimeAnimation();
123
124   void OnCopyPresentation();
125
126   void OnSelectionInfo();
127
128   void OnScaling();
129
130
131 protected:
132   virtual SalomeApp_Selection* createSelection() const;
133
134   void ErasePrs (CORBA::Object_ptr theObject, bool theUpdate = true);
135   void ChangeRepresentation (VISU::PresentationType theType);
136   void CreateMesh (const Handle(SALOME_InteractiveObject)& theIO);
137
138 private:
139   void                         createActions();
140   void                         createMenus();
141   void                         createToolBars();
142   void                         createPopupMenus();
143 };
144
145 #endif