1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
4 * ModuleBase_WidgetFactory.h
6 * Created on: Apr 3, 2014
10 #ifndef ModuleBase_WidgetFactory_H_
11 #define ModuleBase_WidgetFactory_H_
13 #include "ModuleBase.h"
14 #include "ModuleBase_ModelWidget.h"
21 class Config_WidgetAPI;
22 class ModuleBase_IWorkshop;
24 class MODULEBASE_EXPORT ModuleBase_WidgetFactory
27 ModuleBase_WidgetFactory(const std::string& theXmlRepresentation,
28 ModuleBase_IWorkshop* theWorkshop);
29 virtual ~ModuleBase_WidgetFactory();
31 void createWidget(QWidget* theParent);
33 QList<ModuleBase_ModelWidget*> getModelWidgets() const
35 return myModelWidgets;
40 QWidget* createWidgetByType(const std::string& theType, QWidget* theParent = NULL);
41 QWidget* createContainer(const std::string& theType, QWidget* theParent = NULL);
42 QWidget* labelControl(QWidget* theParent);
43 QWidget* doubleSpinBoxControl(QWidget* theParent);
44 QWidget* doubleValueEditor(QWidget* theParent);
45 QWidget* shapeSelectorControl(QWidget* theParent);
46 QWidget* booleanControl(QWidget* theParent);
47 QWidget* fileSelectorControl(QWidget* theParent);
48 QWidget* choiceControl(QWidget* theParent);
49 QWidget* lineEditControl(QWidget* theParent);
50 QWidget* multiSelectorControl(QWidget* theParent);
53 QString qs(const std::string& theStdString) const;
56 Config_WidgetAPI* myWidgetApi;
57 ModuleBase_IWorkshop* myWorkshop;
59 QList<ModuleBase_ModelWidget*> myModelWidgets;
60 std::string myParentId;
63 #endif /* ModuleBase_WidgetFactory_H_ */