1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: CollectionPlugin_WidgetCreator.h
4 // Created: 15 Nov 2016
5 // Author: Vitaly SMETANNIKOV
8 #ifndef CollectionPlugin_WidgetCreator_H
9 #define CollectionPlugin_WidgetCreator_H
12 #include "CollectionPlugin.h"
13 #include <ModuleBase_IWidgetCreator.h>
22 * Interface to WidgetCreator which can create specific widgets by type
24 class CollectionPlugin_WidgetCreator : public ModuleBase_IWidgetCreator
27 /// Default constructor
28 CollectionPlugin_WidgetCreator();
30 /// Virtual destructor
31 ~CollectionPlugin_WidgetCreator() {}
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);
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,
46 Config_WidgetAPI* theWidgetApi,
47 ModuleBase_IWorkshop* /*theWorkshop*/);
49 std::set<std::string> myPanelTypes; ///< types of panels