1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: CollectionPlugin_WidgetCreator.cpp
4 // Created: 15 Nov 2016
5 // Author: Vitaly SMETANNIKOV
7 #include "CollectionPlugin_WidgetCreator.h"
8 #include "CollectionPlugin_WidgetField.h"
11 CollectionPlugin_WidgetCreator::CollectionPlugin_WidgetCreator()
12 : ModuleBase_IWidgetCreator()
14 myPanelTypes.insert("field-panel");
17 void CollectionPlugin_WidgetCreator::widgetTypes(std::set<std::string>& theTypes)
19 theTypes = myPanelTypes;
23 ModuleBase_ModelWidget* CollectionPlugin_WidgetCreator::createWidgetByType(
24 const std::string& theType,
26 Config_WidgetAPI* theWidgetApi,
27 ModuleBase_IWorkshop* theWorkshop)
29 ModuleBase_ModelWidget* aWidget = 0;
30 if (myPanelTypes.find(theType) == myPanelTypes.end())
33 if (theType == "field-panel") {
34 aWidget = new CollectionPlugin_WidgetField(theParent, theWorkshop, theWidgetApi);