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,
26 ModuleBase_IWorkshop* theWorkshop);
27 virtual ~ModuleBase_WidgetFactory();
29 void createWidget(QWidget* theParent);
31 QList<ModuleBase_ModelWidget*> getModelWidgets() const
33 return myModelWidgets;
38 QWidget* createWidgetByType(const std::string& theType, QWidget* theParent = NULL);
39 QWidget* labelControl(QWidget* theParent);
40 QWidget* doubleSpinBoxControl(QWidget* theParent);
41 QWidget* pointSelectorControl(QWidget* theParent);
42 QWidget* featureSelectorControl(QWidget* theParent);
43 QWidget* featureOrAttributeSelectorControl(QWidget* theParent);
44 QWidget* doubleValueEditor(QWidget* theParent);
45 QWidget* createContainer(const std::string& theType, QWidget* theParent = NULL);
46 QWidget* selectorControl(QWidget* theParent);
47 QWidget* booleanControl(QWidget* theParent);
48 QWidget* point2dDistanceControl(QWidget* theParent);
49 QWidget* fileSelectorControl(QWidget* theParent);
50 QWidget* choiceControl(QWidget* theParent);
52 /// Check whether the XML definition for the given type contains internal property
53 /// \param theType the widget type
54 /// \return the boolean result
55 bool isInternalWidget(const std::string& theType);
57 QString qs(const std::string& theStdString) const;
60 Config_WidgetAPI* myWidgetApi;
61 ModuleBase_IWorkshop* myWorkshop;
63 QList<ModuleBase_ModelWidget*> myModelWidgets;
64 std::string myParentId;
67 #endif /* ModuleBase_WidgetFactory_H_ */