/*
- * ModuleBase_IModelWidget.h
*
- * Created on: Apr 30, 2014
- * Author: sbh
*/
#ifndef MODULEBASE_METAWIDGET_H_
#define MODULEBASE_METAWIDGET_H_
-#include <ModuleBase_IModelWidget.h>
#include <ModuleBase.h>
+#include <ModuleBase_ModelWidget.h>
#include <ModelAPI_Feature.h>
#include <QWidget>
-#include <QString>
#include <boost/shared_ptr.hpp>
/*
*
*/
-class ModuleBase_MetaWidget : public ModuleBase_IModelWidget
+class ModuleBase_MetaWidget : public ModuleBase_ModelWidget
{
public:
- MODULEBASE_EXPORT ModuleBase_MetaWidget(const QString& theId,
- QWidget* theWrapped,
- boost::shared_ptr<ModelAPI_Feature>);
+ MODULEBASE_EXPORT ModuleBase_MetaWidget(QWidget* theWrapped);
virtual ~ModuleBase_MetaWidget();
//! Interface for saving widget's data into the data model
- MODULEBASE_EXPORT virtual bool storeValue();
+ MODULEBASE_EXPORT virtual bool storeValue(FeaturePtr theFeature);
//! Interface for loading widget's data from the data model
- MODULEBASE_EXPORT virtual bool restoreValue();
+ MODULEBASE_EXPORT virtual bool restoreValue(FeaturePtr theFeature);
+
+ /// Set focus to the current widget if it corresponds to the given attribute
+ /// \param theAttribute name
+ MODULEBASE_EXPORT virtual bool focusTo(const std::string& theAttributeName);
+
+ /// Returns list of widget controls
+ /// \return a control list
+ virtual QList<QWidget*> getControls() const;
private:
- QString myId;
QWidget* myWrappedWidget;
- boost::shared_ptr<ModelAPI_Feature> myFeature;
};
#endif /* MODULEBASE_METAWIDGET_H_ */