1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 #ifndef ModuleBase_IWidgetCreator_H
4 #define ModuleBase_IWidgetCreator_H
6 #include "ModuleBase.h"
12 class ModuleBase_ModelWidget;
18 * Interface to WidgetCreator which can create specific widgets by type
20 class MODULEBASE_EXPORT ModuleBase_IWidgetCreator
23 /// Default constructor
24 ModuleBase_IWidgetCreator();
26 /// Virtual destructor
27 ~ModuleBase_IWidgetCreator();
29 /// Returns a list of possible widget types, which this creator can process
31 virtual const std::set<std::string>& widgetTypes() = 0;
33 /// Create widget by its type
34 /// \param theType a type
35 /// \param theParent a parent widget
36 virtual ModuleBase_ModelWidget* createWidgetByType(const std::string& theType,
37 QWidget* theParent = NULL) = 0;
40 typedef std::shared_ptr<ModuleBase_IWidgetCreator> WidgetCreatorPtr;