]> SALOME platform Git repositories - modules/shaper.git/blob - src/ModuleBase/ModuleBase_MetaWidget.h
Salome HOME
c81efee13e83533f132fc21708da3048e238006d
[modules/shaper.git] / src / ModuleBase / ModuleBase_MetaWidget.h
1 /*
2  * ModuleBase_IModelWidget.h
3  *
4  *  Created on: Apr 30, 2014
5  *      Author: sbh
6  */
7
8 #ifndef MODULEBASE_METAWIDGET_H_
9 #define MODULEBASE_METAWIDGET_H_
10
11 #include <ModuleBase_IModelWidget.h>
12 #include <ModuleBase.h>
13
14 #include <ModelAPI_Feature.h>
15
16 #include <QWidget>
17 #include <QString>
18
19 #include <boost/shared_ptr.hpp>
20
21 /*
22  *
23  */
24 class ModuleBase_MetaWidget : public ModuleBase_IModelWidget
25 {
26 public:
27   MODULEBASE_EXPORT ModuleBase_MetaWidget(const QString& theId,
28                                            QWidget* theWrapped,
29                                            boost::shared_ptr<ModelAPI_Feature>);
30   virtual ~ModuleBase_MetaWidget();
31   //! Interface for saving widget's data into the data model
32   MODULEBASE_EXPORT virtual bool storeValue();
33   //! Interface for loading widget's data from the data model
34   MODULEBASE_EXPORT virtual bool restoreValue();
35
36 private:
37   QString  myId;
38   QWidget* myWrappedWidget;
39   boost::shared_ptr<ModelAPI_Feature> myFeature;
40 };
41
42 #endif /* MODULEBASE_METAWIDGET_H_ */