1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 #ifndef SketchShapePlugin_WidgetCreator_H
4 #define SketchShapePlugin_WidgetCreator_H
6 #include <ModuleBase_IWidgetCreator.h>
11 class ModuleBase_ModelWidget;
16 * Interface to WidgetCreator which can create specific widgets by type
18 class SketchShapePlugin_WidgetCreator : public ModuleBase_IWidgetCreator
21 /// Default constructor
22 SketchShapePlugin_WidgetCreator();
24 /// Virtual destructor
25 ~SketchShapePlugin_WidgetCreator() {}
27 /// Returns a container of possible page types, which this creator can process
29 virtual const std::set<std::string>& pageTypes();
31 /// Returns a list of possible widget types, which this creator can process
33 virtual const std::set<std::string>& widgetTypes();
35 /// Create page by its type
36 /// \param theType a type
37 /// \param theParent a parent widget
38 virtual ModuleBase_PageBase* createPageByType(const std::string& theType,
41 /// Create widget by its type
42 /// \param theType a type
43 /// \param theParent a parent widget
44 virtual ModuleBase_ModelWidget* createWidgetByType(const std::string& theType,
45 QWidget* theParent = NULL);
48 std::set<std::string> myPages; /// types of pages
49 std::set<std::string> myTypes; /// types of widgets
52 typedef std::shared_ptr<SketchShapePlugin_WidgetCreator> SketchShapePlguinWidgetCreatorPtr;