1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: ParametersPlugin_WidgetCreator.h
4 // Created: 11 Apr 2016
5 // Author: Vitaly SMETANNIKOV
7 #ifndef ParametersPlugin_WidgetCreator_H
8 #define ParametersPlugin_WidgetCreator_H
10 #include "ParametersPlugin.h"
12 #include <ModuleBase_IWidgetCreator.h>
19 * Interface to WidgetCreator which can create specific widgets by type
21 class ParametersPlugin_WidgetCreator : public ModuleBase_IWidgetCreator
24 /// Default constructor
25 ParametersPlugin_WidgetCreator();
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);
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,
40 Config_WidgetAPI* theWidgetApi,
41 ModuleBase_IWorkshop* theWorkshop);