Salome HOME
Issue #1903: Set default value for string
[modules/shaper.git] / src / CollectionPlugin / CollectionPlugin_WidgetCreator.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        CollectionPlugin_WidgetCreator.h
4 // Created:     15 Nov 2016
5 // Author:      Vitaly SMETANNIKOV
6
7
8 #ifndef CollectionPlugin_WidgetCreator_H
9 #define CollectionPlugin_WidgetCreator_H
10
11
12 #include "CollectionPlugin.h"
13 #include <ModuleBase_IWidgetCreator.h>
14
15 #include <string>
16 #include <set>
17
18 class QWidget;
19
20 /** 
21 * \ingroup GUI
22 * Interface to WidgetCreator which can create specific widgets by type
23 */
24 class CollectionPlugin_WidgetCreator : public ModuleBase_IWidgetCreator
25 {
26 public:
27   /// Default constructor
28   CollectionPlugin_WidgetCreator();
29
30   /// Virtual destructor
31   ~CollectionPlugin_WidgetCreator() {}
32
33   /// Returns a container of possible page types, which this creator can process
34   /// \param theTypes a list of type names
35   virtual void widgetTypes(std::set<std::string>& theTypes);
36
37   /// Create widget by its type
38   /// The default implementation is empty
39   /// \param theType a type
40   /// \param theParent a parent widget
41   /// \param theData a low-level API for reading xml definitions of widgets
42   /// \param theWorkshop a current workshop
43   /// \return a created model widget or null
44   virtual ModuleBase_ModelWidget* createWidgetByType(const std::string& theType,
45                                                      QWidget* theParent,
46                                                      Config_WidgetAPI* theWidgetApi,
47                                                      ModuleBase_IWorkshop* /*theWorkshop*/);
48 private:
49   std::set<std::string> myPanelTypes; ///< types of panels
50 };
51
52 #endif