Salome HOME
Merge with PythonAPI branch
[modules/shaper.git] / src / ModuleBase / ModuleBase_IWidgetCreator.h
index 4f1e040de9ec87e3bbc8c0c2f4211e96fd6040f7..ecdee3a848a534f3e95c0af2d6a3bbafe049723e 100755 (executable)
@@ -5,10 +5,12 @@
 
 #include "ModuleBase.h"
 
-#include <list>
+#include <set>
 #include <string>
+#include <memory>
 
 class ModuleBase_ModelWidget;
+class ModuleBase_PageBase;
 
 class QWidget;
 
@@ -25,16 +27,28 @@ public:
   /// Virtual destructor
   ~ModuleBase_IWidgetCreator();
 
-  /// Returns a list of possible widget types, which this creator can process
-  /// \param theTypes
-  virtual void widgetTypes(std::list<std::string>& theTypes) = 0;
+  /// Returns a container of possible page types, which this creator can process
+  /// \returns types
+  virtual const std::set<std::string>& pageTypes() = 0;
 
-   /// Create widget by its type
+  /// Returns a container of possible widget types, which this creator can process
+  /// \returns types
+  virtual const std::set<std::string>& widgetTypes() = 0;
+
+  /// Create page by its type
+  /// \param theType a type
+  /// \param theParent a parent widget
+  virtual ModuleBase_PageBase* createPageByType(const std::string& theType,
+                                                QWidget* theParent) = 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;
 };
 
+typedef std::shared_ptr<ModuleBase_IWidgetCreator> WidgetCreatorPtr;
+
 
 #endif
\ No newline at end of file