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;
12 class ModuleBase_IWorkshop;
17 * Interface to WidgetCreator which can create specific widgets by type
19 class SketchShapePlugin_WidgetCreator : public ModuleBase_IWidgetCreator
22 /// Default constructor
23 SketchShapePlugin_WidgetCreator();
25 /// Virtual destructor
26 ~SketchShapePlugin_WidgetCreator() {}
28 /// Returns a container of possible page types, which this creator can process
30 virtual const std::set<std::string>& pageTypes();
32 /// Returns a list of possible widget types, which this creator can process
34 virtual const std::set<std::string>& widgetTypes();
36 /// Create page by its type
37 /// \param theType a type
38 /// \param theParent a parent widget
39 virtual ModuleBase_PageBase* createPageByType(const std::string& theType,
41 Config_WidgetAPI* theWidgetApi,
42 std::string theParentId);
44 /// Create widget by its type
45 /// \param theType a type
46 /// \param theParent a parent widget
47 virtual ModuleBase_ModelWidget* createWidgetByType(const std::string& theType,
49 Config_WidgetAPI* theWidgetApi,
50 std::string theParentId,
51 ModuleBase_IWorkshop* theWorkshop);
54 std::set<std::string> myPages; /// types of pages
55 std::set<std::string> myWidgets; /// types of widgets
58 typedef std::shared_ptr<SketchShapePlugin_WidgetCreator> SketchShapePlguinWidgetCreatorPtr;