Salome HOME
Fix for issue #1174
[modules/shaper.git] / src / ModuleBase / ModuleBase_IWidgetCreator.h
index d544ecfe70f69951e18e2c5c71bca55f3e495191..91a076d447335fb4be8fad3ec1c390a3971d5f98 100755 (executable)
@@ -7,8 +7,13 @@
 
 #include <set>
 #include <string>
+#include <memory>
 
 class ModuleBase_ModelWidget;
+class ModuleBase_PageBase;
+class ModuleBase_IWorkshop;
+
+class Config_WidgetAPI;
 
 class QWidget;
 
@@ -25,15 +30,30 @@ public:
   /// Virtual destructor
   ~ModuleBase_IWidgetCreator();
 
-  /// Returns a list of possible widget types, which this creator can process
-  /// \param theTypes
+  /// Returns a container of possible page types, which this creator can process
+  /// \returns types
+  virtual const std::set<std::string>& pageTypes() = 0;
+
+  /// Returns a container of possible widget types, which this creator can process
+  /// \returns types
   virtual const std::set<std::string>& 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<ModuleBase_IWidgetCreator> WidgetCreatorPtr;