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