2 * ModuleBase_WidgetFactory.h
4 * Created on: Apr 3, 2014
8 #ifndef ModuleBase_WidgetFactory_H_
9 #define ModuleBase_WidgetFactory_H_
11 #include "ModuleBase.h"
12 #include "ModuleBase_ModelWidget.h"
19 class Config_WidgetAPI;
20 class ModuleBase_IWorkshop;
22 class MODULEBASE_EXPORT ModuleBase_WidgetFactory
25 ModuleBase_WidgetFactory(const std::string& theXmlRepresentation, ModuleBase_IWorkshop* theWorkshop);
26 virtual ~ModuleBase_WidgetFactory();
28 void createWidget(QWidget* theParent);
30 QList<ModuleBase_ModelWidget*> getModelWidgets() const
32 return myModelWidgets;
37 QWidget* createWidgetByType(const std::string& theType, QWidget* theParent = NULL);
38 QWidget* labelControl(QWidget* theParent);
39 QWidget* doubleSpinBoxControl(QWidget* theParent);
40 QWidget* pointSelectorControl(QWidget* theParent);
41 QWidget* featureSelectorControl(QWidget* theParent);
42 QWidget* doubleValueEditor(QWidget* theParent);
43 QWidget* createContainer(const std::string& theType, QWidget* theParent = NULL);
44 QWidget* selectorControl(QWidget* theParent);
45 QWidget* booleanControl(QWidget* theParent);
46 QWidget* point2dDistanceControl(QWidget* theParent);
48 /// Check whether the XML definition for the given type contains internal property
49 /// \param theType the widget type
50 /// \return the boolean result
51 bool isInternalWidget(const std::string& theType);
53 QString qs(const std::string& theStdString) const;
56 Config_WidgetAPI* myWidgetApi;
57 ModuleBase_IWorkshop* myWorkshop;
59 QList<ModuleBase_ModelWidget*> myModelWidgets;
62 #endif /* ModuleBase_WidgetFactory_H_ */