5 #ifndef MODULEBASE_METAWIDGET_H_
6 #define MODULEBASE_METAWIDGET_H_
8 #include <ModuleBase.h>
9 #include <ModuleBase_ModelWidget.h>
11 #include <ModelAPI_Feature.h>
15 #include <boost/shared_ptr.hpp>
20 class ModuleBase_MetaWidget : public ModuleBase_ModelWidget
23 MODULEBASE_EXPORT ModuleBase_MetaWidget(QWidget* theWrapped);
24 virtual ~ModuleBase_MetaWidget();
25 //! Interface for saving widget's data into the data model
26 MODULEBASE_EXPORT virtual bool storeValue(FeaturePtr theFeature);
27 //! Interface for loading widget's data from the data model
28 MODULEBASE_EXPORT virtual bool restoreValue(FeaturePtr theFeature);
30 /// Set focus to the current widget if it corresponds to the given attribute
31 /// \param theAttribute name
32 MODULEBASE_EXPORT virtual bool focusTo(const std::string& theAttributeName);
34 /// Returns list of widget controls
35 /// \return a control list
36 virtual QList<QWidget*> getControls() const;
39 QWidget* myWrappedWidget;
42 #endif /* MODULEBASE_METAWIDGET_H_ */