Salome HOME
Issue #273: Add copyright string
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetFactory.h
index 3241bfb2f12e7450af0415e5a5ae2a3345cee84e..f81ee61c982ff850b9747c050a3a4394e8764d04 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
 /*
  * ModuleBase_WidgetFactory.h
  *
 #ifndef ModuleBase_WidgetFactory_H_
 #define ModuleBase_WidgetFactory_H_
 
-#include <ModuleBase.h>
+#include "ModuleBase.h"
+#include "ModuleBase_ModelWidget.h"
+
 #include <QString>
+#include <QList>
 
 class QObject;
 class QWidget;
 class Config_WidgetAPI;
-class ModuleBase_Operation;
+class ModuleBase_IWorkshop;
 
 class MODULEBASE_EXPORT ModuleBase_WidgetFactory
 {
-public:
-  ModuleBase_WidgetFactory(ModuleBase_Operation*);
+ public:
+  ModuleBase_WidgetFactory(const std::string& theXmlRepresentation,
+                           ModuleBase_IWorkshop* theWorkshop);
   virtual ~ModuleBase_WidgetFactory();
 
   void createWidget(QWidget* theParent);
 
-protected:
+  QList<ModuleBase_ModelWidget*> getModelWidgets() const
+  {
+    return myModelWidgets;
+  }
+
+ protected:
   //Widgets
   QWidget* createWidgetByType(const std::string& theType, QWidget* theParent = NULL);
-  QWidget* labelControl(QWidget* theParent);
-  QWidget* doubleSpinBoxControl();
-  QWidget* pointSelectorControl(QWidget* theParent);
   QWidget* createContainer(const std::string& theType, QWidget* theParent = NULL);
+  QWidget* labelControl(QWidget* theParent);
+  QWidget* doubleSpinBoxControl(QWidget* theParent);
+  QWidget* doubleValueEditor(QWidget* theParent);
+  QWidget* shapeSelectorControl(QWidget* theParent);
+  QWidget* booleanControl(QWidget* theParent);
+  QWidget* fileSelectorControl(QWidget* theParent);
+  QWidget* choiceControl(QWidget* theParent);
+  QWidget* lineEditControl(QWidget* theParent);
+  QWidget* multiSelectorControl(QWidget* theParent);
+
 
-  bool connectWidget(QObject*, const QString&);
   QString qs(const std::string& theStdString) const;
 
-private:
+ private:
   Config_WidgetAPI* myWidgetApi;
-  ModuleBase_Operation*   myOperation;
-
+  ModuleBase_IWorkshop* myWorkshop;
 
+  QList<ModuleBase_ModelWidget*> myModelWidgets;
+  std::string myParentId;
 };
 
 #endif /* ModuleBase_WidgetFactory_H_ */