X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FModuleBase%2FModuleBase_IWidgetCreator.h;h=91a076d447335fb4be8fad3ec1c390a3971d5f98;hb=752c9e02e6aa8ced24e9b53097cb42540d5e6a08;hp=4f1e040de9ec87e3bbc8c0c2f4211e96fd6040f7;hpb=f7fec0e59ee28ac393cce1143c881b9995ae000f;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_IWidgetCreator.h b/src/ModuleBase/ModuleBase_IWidgetCreator.h index 4f1e040de..91a076d44 100755 --- a/src/ModuleBase/ModuleBase_IWidgetCreator.h +++ b/src/ModuleBase/ModuleBase_IWidgetCreator.h @@ -5,10 +5,15 @@ #include "ModuleBase.h" -#include +#include #include +#include class ModuleBase_ModelWidget; +class ModuleBase_PageBase; +class ModuleBase_IWorkshop; + +class Config_WidgetAPI; class QWidget; @@ -25,16 +30,33 @@ public: /// Virtual destructor ~ModuleBase_IWidgetCreator(); - /// Returns a list of possible widget types, which this creator can process - /// \param theTypes - virtual void widgetTypes(std::list& theTypes) = 0; + /// Returns a container of possible page types, which this creator can process + /// \returns types + virtual const std::set& pageTypes() = 0; + + /// Returns a container of possible widget types, which this creator can process + /// \returns types + virtual const std::set& widgetTypes() = 0; - /// Create widget by its type + /// Create page by its type + /// \param theType a type + /// \param theParent a parent widget + virtual ModuleBase_PageBase* createPageByType(const std::string& theType, + QWidget* theParent, + Config_WidgetAPI* theWidgetApi, + std::string theParentId) = 0; + + /// Create widget by its type /// \param theType a type /// \param theParent a parent widget virtual ModuleBase_ModelWidget* createWidgetByType(const std::string& theType, - QWidget* theParent = NULL) = 0; + QWidget* theParent, + Config_WidgetAPI* theWidgetApi, + std::string theParentId, + ModuleBase_IWorkshop* theWorkshop) = 0; }; +typedef std::shared_ptr WidgetCreatorPtr; + #endif \ No newline at end of file