X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_IWidgetCreator.h;h=eac9882635f416b2e0dd52c89c67c5e1277bcd6d;hb=397bec888031ab3d5d0578d3094e01f9a052222f;hp=91a076d447335fb4be8fad3ec1c390a3971d5f98;hpb=31c4ff77330b870d466fbd6b38e1fa566600f79a;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_IWidgetCreator.h b/src/ModuleBase/ModuleBase_IWidgetCreator.h index 91a076d44..eac988263 100755 --- a/src/ModuleBase/ModuleBase_IWidgetCreator.h +++ b/src/ModuleBase/ModuleBase_IWidgetCreator.h @@ -5,6 +5,8 @@ #include "ModuleBase.h" +#include "ModelAPI_Feature.h" + #include #include #include @@ -31,29 +33,47 @@ public: ~ModuleBase_IWidgetCreator(); /// Returns a container of possible page types, which this creator can process - /// \returns types - virtual const std::set& pageTypes() = 0; + /// The default implementation is empty + /// \param theTypes a list of type names + virtual void panelTypes(std::set& theTypes) {} + + /// Returns a container of possible page types, which this creator can process + /// The default implementation is empty + /// \param a list of type names + virtual void pageTypes(std::set& theTypes) {} /// Returns a container of possible widget types, which this creator can process - /// \returns types - virtual const std::set& widgetTypes() = 0; + /// \param a list of type names + virtual void widgetTypes(std::set& theTypes) {} + + /// Create panel control by its type. + /// The default implementation is empty + /// \param theType a panel type + /// \param theParent a parent widget + /// \param theFeature a feature modified in the panel + /// \return created widget or null + virtual QWidget* createPanelByType(const std::string& theType, + QWidget* theParent, + const FeaturePtr& theFeature); /// Create page by its type + /// The default implementation is empty /// \param theType a type /// \param theParent a parent widget + /// \param theData a low-level API for reading xml definitions of widgets virtual ModuleBase_PageBase* createPageByType(const std::string& theType, QWidget* theParent, - Config_WidgetAPI* theWidgetApi, - std::string theParentId) = 0; + Config_WidgetAPI* theWidgetApi); /// Create widget by its type - /// \param theType a type - /// \param theParent a parent widget + /// The default implementation is empty + /// \param theType a type + /// \param theParent a parent widget + /// \param theData a low-level API for reading xml definitions of widgets virtual ModuleBase_ModelWidget* createWidgetByType(const std::string& theType, QWidget* theParent, Config_WidgetAPI* theWidgetApi, - std::string theParentId, - ModuleBase_IWorkshop* theWorkshop) = 0; + ModuleBase_IWorkshop* theWorkshop); }; typedef std::shared_ptr WidgetCreatorPtr;