]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/ModuleBase/ModuleBase_MetaWidget.h
Salome HOME
refs #80 - Sketch base GUI: create/draw point, circle and arc
[modules/shaper.git] / src / ModuleBase / ModuleBase_MetaWidget.h
index c81efee13e83533f132fc21708da3048e238006d..42504e0f0a98203a44d1b34501f40c93b2575c64 100644 (file)
@@ -1,42 +1,42 @@
 /*
- * 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_ */