1 // Copyright (C) 2007-2010 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // Partitioning/decimation module for the SALOME v3.2 platform
25 * \brief MULTIPR GUI (QT)
27 * \author Olivier LE ROUX - CS, Virtual Reality Dpt
32 #ifndef __MULTIPR_GUI__
33 #define __MULTIPR_GUI__
36 //*****************************************************************************
38 //*****************************************************************************
40 #include <SalomeApp_Module.h>
41 #include <LightApp_DataObject.h>
42 //#include <LightApp_DataModel.h>
43 #include <SalomeApp_DataModel.h>
45 #include <SALOMEconfig.h>
46 #include CORBA_CLIENT_HEADER(MULTIPR)
48 #include "MULTIPR_ProgressCallback.hxx"
51 //*****************************************************************************
53 //*****************************************************************************
55 class SalomeApp_Application;
72 //class MULTIPR_GUI_ProgressCallbackDlg;
73 class QProgressDialog;
75 //*****************************************************************************
78 //*****************************************************************************
80 class MULTIPR_GUI: public SalomeApp_Module
88 virtual ~MULTIPR_GUI();
90 void initialize(CAM_Application*);
92 QString engineIOR() const;
94 void windows(QMap<int, int>&) const;
96 MULTIPR_ORB::MULTIPR_Obj_ptr getMULTIPRObj();
97 void setMULTIPRObj (MULTIPR_ORB::MULTIPR_Obj_ptr theObj);
99 SalomeApp_Application* getAppli() const;
101 void selected(QStringList&, const bool);
103 const QStringList& getSelectedParts() const { return mSelectedParts; }
105 static SUIT_Desktop* desktop();
109 bool deactivateModule(SUIT_Study*);
110 bool activateModule(SUIT_Study*);
114 void OnImportFromMEDFile();
121 void timerDone(); // update saving progress dialog
125 virtual CAM_DataModel* createDataModel();
127 void retrieveSelectedParts();
128 bool isPartExist(const char* partName);
129 bool removeLowerResolution();
135 ACTION_IMPORT_MED = 190,
144 QString mMEDFileName;
145 QStringList mSelectedParts;
146 //MULTIPR_ORB::MULTIPR_Obj_ptr mMULTIPRObj;
147 MULTIPR_ORB::MULTIPR_Obj_var mMULTIPRObj;
149 QProgressDialog* mProgress;
150 //MULTIPR_GUI_ProgressCallbackDlg* mProgress;
153 }; // class MULTIPR_GUI
156 //*****************************************************************************
157 // Class MULTIPR_GUI_DataObject
158 // To use Object Browser
159 //*****************************************************************************
161 class MULTIPR_GUI_DataObject : public LightApp_DataObject
165 MULTIPR_GUI_DataObject(SUIT_DataObject* parent, const char* name);
166 virtual ~MULTIPR_GUI_DataObject();
168 virtual QString entry() const;
169 virtual QString name() const;
170 virtual QPixmap icon() const;
171 virtual QString toolTip() const;
179 //*****************************************************************************
180 // Class MULTIPR_GUI_DataObject_Module
181 //*****************************************************************************
184 class MULTIPR_GUI_DataObject_Module : public MULTIPR_GUI_DataObject
188 MULTIPR_GUI_DataObject_Module(CAM_DataModel* dm, SUIT_DataObject* parent, const char* name);
189 virtual ~MULTIPR_GUI_DataObject_Module();
191 virtual QString entry() const;
192 virtual QString name() const;
193 virtual QPixmap icon() const;
194 virtual QString toolTip() const;
199 SUIT_DataObject* mParent;
203 //*****************************************************************************
204 // Class MULTIPR_GUI_DataObject_Mesh
205 //*****************************************************************************
207 class MULTIPR_GUI_DataObject_Mesh : public MULTIPR_GUI_DataObject
211 MULTIPR_GUI_DataObject_Mesh(SUIT_DataObject* parent, const char* name);
212 virtual ~MULTIPR_GUI_DataObject_Mesh();
214 virtual QString entry() const;
215 virtual QPixmap icon() const;
216 virtual QString toolTip() const;
220 //*****************************************************************************
221 // Class MULTIPR_GUI_DataObject_Part
222 //*****************************************************************************
224 class MULTIPR_GUI_DataObject_Part : public MULTIPR_GUI_DataObject
228 MULTIPR_GUI_DataObject_Part(SUIT_DataObject* parent, const char* name, const char* info);
229 virtual ~MULTIPR_GUI_DataObject_Part();
231 virtual QString entry() const;
232 virtual QPixmap icon() const;
233 virtual QString toolTip() const;
240 QString mMEDFileName;
245 //*****************************************************************************
246 // Class MULTIPR_GUI_DataObject_Resolution
247 //*****************************************************************************
249 class MULTIPR_GUI_DataObject_Resolution : public MULTIPR_GUI_DataObject_Part
253 MULTIPR_GUI_DataObject_Resolution(SUIT_DataObject* parent, const char* name, const char* info);
254 virtual ~MULTIPR_GUI_DataObject_Resolution();
256 virtual QString entry() const;
257 virtual QPixmap icon() const;
258 virtual QString toolTip() const;
262 //*****************************************************************************
263 // Class MULTIPR_GUI_DataModel
264 //*****************************************************************************
266 //class MULTIPR_GUI_DataModel : public LightApp_DataModel
267 class MULTIPR_GUI_DataModel : public SalomeApp_DataModel
272 MULTIPR_GUI_DataModel(CAM_Module*);
273 virtual ~MULTIPR_GUI_DataModel();
275 virtual void update (LightApp_DataObject* = 0, LightApp_Study* = 0);
279 virtual void build();
280 void buildAll (LightApp_Study* = 0);
284 MULTIPR_GUI* mMULTIPR_GUI;
288 #endif // __MULTIPR_GUI__