X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_WidgetFactory.h;h=fd267d41801bd144d92aa5841b20f71ece86af69;hb=7981678231adaa3ef7468d7564fef427cffdaf50;hp=3241bfb2f12e7450af0415e5a5ae2a3345cee84e;hpb=6df60c642d0427e2cb42bd29e2c64d4e5dbdaee4;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_WidgetFactory.h b/src/ModuleBase/ModuleBase_WidgetFactory.h index 3241bfb2f..fd267d418 100644 --- a/src/ModuleBase/ModuleBase_WidgetFactory.h +++ b/src/ModuleBase/ModuleBase_WidgetFactory.h @@ -8,38 +8,58 @@ #ifndef ModuleBase_WidgetFactory_H_ #define ModuleBase_WidgetFactory_H_ -#include +#include "ModuleBase.h" +#include "ModuleBase_ModelWidget.h" + #include +#include 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 getModelWidgets() const + { + return myModelWidgets; + } + + protected: //Widgets QWidget* createWidgetByType(const std::string& theType, QWidget* theParent = NULL); + QWidget* createContainer(const std::string& theType, QWidget* theParent = NULL); QWidget* labelControl(QWidget* theParent); - QWidget* doubleSpinBoxControl(); + QWidget* doubleSpinBoxControl(QWidget* theParent); QWidget* pointSelectorControl(QWidget* theParent); - QWidget* createContainer(const std::string& theType, QWidget* theParent = NULL); + QWidget* featureSelectorControl(QWidget* theParent); + QWidget* featureOrAttributeSelectorControl(QWidget* theParent); + QWidget* doubleValueEditor(QWidget* theParent); + QWidget* shapeSelectorControl(QWidget* theParent); + QWidget* booleanControl(QWidget* theParent); + QWidget* point2dDistanceControl(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 myModelWidgets; + std::string myParentId; }; #endif /* ModuleBase_WidgetFactory_H_ */