Salome HOME
Simplification of environment due to SALOME standards
[modules/shaper.git] / src / SamplePanelPlugin / SamplePanelPlugin_WidgetCreator.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        SamplePanelPlugin_WidgetCreator.h
4 // Created:     29 Mar 2015
5 // Author:      Natalia ERMOLAEVA
6
7 #ifndef SamplePanelPlugin_WidgetCreator_H
8 #define SamplePanelPlugin_WidgetCreator_H
9
10 #include "SamplePanelPlugin.h"
11
12 #include <ModuleBase_IWidgetCreator.h>
13
14 #include <string>
15 #include <set>
16
17 class QWidget;
18
19 /** 
20 * \ingroup GUI
21 * Interface to WidgetCreator which can create specific widgets by type
22 */
23 class SamplePanelPlugin_WidgetCreator : public ModuleBase_IWidgetCreator
24 {
25 public:
26   /// Default constructor
27   SamplePanelPlugin_WidgetCreator();
28
29   /// Virtual destructor
30   ~SamplePanelPlugin_WidgetCreator() {}
31
32   /// Returns a container of possible page types, which this creator can process
33   /// \param theTypes a list of type names
34   virtual void panelTypes(std::set<std::string>& theTypes);
35
36   /// Create panel control by its type.
37   /// \param theType a panel type
38   /// \param theParent a parent widget
39   /// \param theFeature a feature to fill the panel
40   /// \return created widget or null
41   virtual QWidget* createPanelByType(const std::string& theType,
42                                      QWidget* theParent,
43                                      const FeaturePtr& theFeature);
44 private:
45   std::set<std::string> myPanelTypes; /// types of panels
46 };
47
48 #endif