1 // Project MULTIPR, IOLS WP1.2.1 - EDF/CS
2 // Partitioning/decimation module for the SALOME v3.2 platform
7 * \brief MULTIPR GUI (QT)
9 * \author Olivier LE ROUX - CS, Virtual Reality Dpt
14 #ifndef __MULTIPR_GUI__
15 #define __MULTIPR_GUI__
18 //*****************************************************************************
20 //*****************************************************************************
22 #include <SalomeApp_Module.h>
23 #include <LightApp_DataObject.h>
24 #include <LightApp_DataModel.h>
25 #include <LightApp_RootObject.h>
27 #include <SALOMEconfig.h>
28 #include CORBA_CLIENT_HEADER(MULTIPR)
31 #include <qprogressdialog.h>
35 #include "MULTIPR_ProgressCallback.hxx"
38 //*****************************************************************************
40 //*****************************************************************************
42 class SalomeApp_Application;
57 //*****************************************************************************
60 //*****************************************************************************
62 class MULTIPR_GUI: public SalomeApp_Module
69 void initialize(CAM_Application*);
70 QString engineIOR() const;
71 void windows(QMap<int, int>&) const;
73 MULTIPR_ORB::MULTIPR_Obj_ptr getMULTIPRObj();
74 SalomeApp_Application* getAppli() const;
75 void selected(QStringList&, const bool);
77 static MULTIPR_ORB::MULTIPR_Gen_ptr InitMULTIPRGen(SalomeApp_Application*);
79 const QStringList& getSelectedParts() const { return mSelectedParts; }
82 bool deactivateModule(SUIT_Study*);
83 bool activateModule(SUIT_Study*);
86 void OnImportFromMEDFile();
93 void retrieveSelectedParts();
94 bool isPartExist(const char* partName);
95 bool removeLowerResolution();
98 virtual CAM_DataModel* createDataModel();
104 ACTION_IMPORT_MED = 190,
112 QString mMEDFileName;
113 QStringList mSelectedParts;
114 MULTIPR_ORB::MULTIPR_Obj_ptr mMULTIPRObj;
116 }; // class MULTIPR_GUI
119 //*****************************************************************************
120 // Class MULTIPR_GUI_DataObject
121 //*****************************************************************************
123 class MULTIPR_GUI_DataObject : public LightApp_DataObject
126 MULTIPR_GUI_DataObject(SUIT_DataObject* parent, const char* name);
127 virtual ~MULTIPR_GUI_DataObject();
129 virtual QString entry() const;
130 virtual QString name() const;
131 virtual QPixmap icon() const;
132 virtual QString toolTip() const;
139 //*****************************************************************************
140 // Class MULTIPR_GUI_DataObject_Module
141 //*****************************************************************************
143 class MULTIPR_GUI_DataObject_Module : public MULTIPR_GUI_DataObject, public LightApp_ModuleObject
146 MULTIPR_GUI_DataObject_Module(CAM_DataModel* dm, SUIT_DataObject* parent, const char* name);
147 virtual ~MULTIPR_GUI_DataObject_Module();
149 virtual QString entry() const;
150 virtual QString name() const;
151 virtual QPixmap icon() const;
152 virtual QString toolTip() const;
158 //*****************************************************************************
159 // Class MULTIPR_GUI_DataObject_Mesh
160 //*****************************************************************************
162 class MULTIPR_GUI_DataObject_Mesh : public MULTIPR_GUI_DataObject
165 MULTIPR_GUI_DataObject_Mesh(SUIT_DataObject* parent, const char* name);
166 virtual ~MULTIPR_GUI_DataObject_Mesh();
168 virtual QString entry() const;
169 virtual QPixmap icon() const;
170 virtual QString toolTip() const;
176 //*****************************************************************************
177 // Class MULTIPR_GUI_DataObject_Part
178 //*****************************************************************************
180 class MULTIPR_GUI_DataObject_Part : public MULTIPR_GUI_DataObject
183 MULTIPR_GUI_DataObject_Part(SUIT_DataObject* parent, const char* name, const char* info);
184 virtual ~MULTIPR_GUI_DataObject_Part();
186 virtual QString entry() const;
187 virtual QPixmap icon() const;
188 virtual QString toolTip() const;
194 QString mMEDFileName;
199 //*****************************************************************************
200 // Class MULTIPR_GUI_DataObject_Resolution
201 //*****************************************************************************
203 class MULTIPR_GUI_DataObject_Resolution : public MULTIPR_GUI_DataObject_Part
206 MULTIPR_GUI_DataObject_Resolution(SUIT_DataObject* parent, const char* name, const char* info);
207 virtual ~MULTIPR_GUI_DataObject_Resolution();
209 virtual QString entry() const;
210 virtual QPixmap icon() const;
211 virtual QString toolTip() const;
217 //*****************************************************************************
218 // Class MULTIPR_GUI_DataModel
219 //*****************************************************************************
221 class MULTIPR_GUI_DataModel : public LightApp_DataModel
224 MULTIPR_GUI_DataModel(CAM_Module*);
225 virtual ~MULTIPR_GUI_DataModel();
228 virtual void build();
231 MULTIPR_GUI* mMULTIPR_GUI;
235 #endif // __MULTIPR_GUI__