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 <SalomeApp_DataModel.h>
27 #include <SALOMEconfig.h>
28 #include CORBA_CLIENT_HEADER(MULTIPR)
30 #include "MULTIPR_ProgressCallback.hxx"
33 //*****************************************************************************
35 //*****************************************************************************
37 class SalomeApp_Application;
52 //class MULTIPR_GUI_ProgressCallbackDlg;
53 class QProgressDialog;
55 //*****************************************************************************
58 //*****************************************************************************
60 class MULTIPR_GUI: public SalomeApp_Module
68 virtual ~MULTIPR_GUI();
70 void initialize(CAM_Application*);
72 QString engineIOR() const;
74 void windows(QMap<int, int>&) const;
76 MULTIPR_ORB::MULTIPR_Obj_ptr getMULTIPRObj();
77 void setMULTIPRObj (MULTIPR_ORB::MULTIPR_Obj_ptr theObj);
79 SalomeApp_Application* getAppli() const;
81 void selected(QStringList&, const bool);
83 const QStringList& getSelectedParts() const { return mSelectedParts; }
87 bool deactivateModule(SUIT_Study*);
88 bool activateModule(SUIT_Study*);
92 void OnImportFromMEDFile();
99 void timerDone(); // update saving progress dialog
103 virtual CAM_DataModel* createDataModel();
105 void retrieveSelectedParts();
106 bool isPartExist(const char* partName);
107 bool removeLowerResolution();
113 ACTION_IMPORT_MED = 190,
122 QString mMEDFileName;
123 QStringList mSelectedParts;
124 //MULTIPR_ORB::MULTIPR_Obj_ptr mMULTIPRObj;
125 MULTIPR_ORB::MULTIPR_Obj_var mMULTIPRObj;
127 QProgressDialog* mProgress;
128 //MULTIPR_GUI_ProgressCallbackDlg* mProgress;
131 }; // class MULTIPR_GUI
134 //*****************************************************************************
135 // Class MULTIPR_GUI_DataObject
136 // To use Object Browser
137 //*****************************************************************************
139 class MULTIPR_GUI_DataObject : public LightApp_DataObject
143 MULTIPR_GUI_DataObject(SUIT_DataObject* parent, const char* name);
144 virtual ~MULTIPR_GUI_DataObject();
146 virtual QString entry() const;
147 virtual QString name() const;
148 virtual QPixmap icon() const;
149 virtual QString toolTip() const;
157 //*****************************************************************************
158 // Class MULTIPR_GUI_DataObject_Module
159 //*****************************************************************************
161 class MULTIPR_GUI_DataObject_Module : public MULTIPR_GUI_DataObject, public LightApp_ModuleObject
165 MULTIPR_GUI_DataObject_Module(CAM_DataModel* dm, SUIT_DataObject* parent, const char* name);
166 virtual ~MULTIPR_GUI_DataObject_Module();
168 virtual QString entry() const;
169 virtual QString name() const;
170 virtual QPixmap icon() const;
171 virtual QString toolTip() const;
175 //*****************************************************************************
176 // Class MULTIPR_GUI_DataObject_Mesh
177 //*****************************************************************************
179 class MULTIPR_GUI_DataObject_Mesh : public MULTIPR_GUI_DataObject
183 MULTIPR_GUI_DataObject_Mesh(SUIT_DataObject* parent, const char* name);
184 virtual ~MULTIPR_GUI_DataObject_Mesh();
186 virtual QString entry() const;
187 virtual QPixmap icon() const;
188 virtual QString toolTip() const;
192 //*****************************************************************************
193 // Class MULTIPR_GUI_DataObject_Part
194 //*****************************************************************************
196 class MULTIPR_GUI_DataObject_Part : public MULTIPR_GUI_DataObject
200 MULTIPR_GUI_DataObject_Part(SUIT_DataObject* parent, const char* name, const char* info);
201 virtual ~MULTIPR_GUI_DataObject_Part();
203 virtual QString entry() const;
204 virtual QPixmap icon() const;
205 virtual QString toolTip() const;
212 QString mMEDFileName;
217 //*****************************************************************************
218 // Class MULTIPR_GUI_DataObject_Resolution
219 //*****************************************************************************
221 class MULTIPR_GUI_DataObject_Resolution : public MULTIPR_GUI_DataObject_Part
225 MULTIPR_GUI_DataObject_Resolution(SUIT_DataObject* parent, const char* name, const char* info);
226 virtual ~MULTIPR_GUI_DataObject_Resolution();
228 virtual QString entry() const;
229 virtual QPixmap icon() const;
230 virtual QString toolTip() const;
234 //*****************************************************************************
235 // Class MULTIPR_GUI_DataModel
236 //*****************************************************************************
238 //class MULTIPR_GUI_DataModel : public LightApp_DataModel
239 class MULTIPR_GUI_DataModel : public SalomeApp_DataModel
243 MULTIPR_GUI_DataModel(CAM_Module*);
244 virtual ~MULTIPR_GUI_DataModel();
246 virtual void update (LightApp_DataObject* = 0, LightApp_Study* = 0);
250 virtual void build();
251 void buildAll (LightApp_Study* = 0);
255 MULTIPR_GUI* mMULTIPR_GUI;
259 #endif // __MULTIPR_GUI__