Salome HOME
Reusing SUIT libraries
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetFactory.h
index f0303cdae36e66a47d336cb935514118650a8054..5360f35dbba39a443ee05b2e460c5a06f4fe2b54 100644 (file)
@@ -8,8 +8,8 @@
 #ifndef ModuleBase_WidgetFactory_H_
 #define ModuleBase_WidgetFactory_H_
 
-#include <ModuleBase.h>
-#include <ModuleBase_ModelWidget.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*);
+  ModuleBase_WidgetFactory(const std::string& theXmlRepresentation, ModuleBase_IWorkshop* theWorkshop);
   virtual ~ModuleBase_WidgetFactory();
 
   void createWidget(QWidget* theParent);
@@ -36,20 +36,29 @@ protected:
   //Widgets
   QWidget* createWidgetByType(const std::string& theType, QWidget* theParent = NULL);
   QWidget* labelControl(QWidget* theParent);
-  QWidget* doubleSpinBoxControl();
+  QWidget* doubleSpinBoxControl(QWidget* theParent);
   QWidget* pointSelectorControl(QWidget* theParent);
+  QWidget* featureSelectorControl(QWidget* theParent);
+  QWidget* featureOrAttributeSelectorControl(QWidget* theParent);
+  QWidget* doubleValueEditor(QWidget* theParent);
   QWidget* createContainer(const std::string& theType, QWidget* theParent = NULL);
   QWidget* selectorControl(QWidget* theParent);
   QWidget* booleanControl(QWidget* theParent);
+  QWidget* point2dDistanceControl(QWidget* theParent);
+
+  /// Check whether the XML definition for the given type contains internal property
+  /// \param theType the widget type
+  /// \return the boolean result
+  bool isInternalWidget(const std::string& theType);
 
-  bool connectWidget(QObject*, const QString&);
   QString qs(const std::string& theStdString) const;
 
 private:
   Config_WidgetAPI* myWidgetApi;
-  ModuleBase_Operation*   myOperation;
+  ModuleBase_IWorkshop*   myWorkshop;
 
   QList<ModuleBase_ModelWidget*> myModelWidgets;
+  std::string myParentId;
 };
 
 #endif /* ModuleBase_WidgetFactory_H_ */