1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: SamplePanelPlugin_ModelWidgetCreator.cpp
4 // Created: 29 Mar 2015
5 // Author: Natalia ERMOLAEVA
7 #include "SamplePanelPlugin_ModelWidgetCreator.h"
8 #include "SamplePanelPlugin_ModelWidget.h"
10 #include <Config_WidgetAPI.h>
12 SamplePanelPlugin_ModelWidgetCreator::SamplePanelPlugin_ModelWidgetCreator()
13 : ModuleBase_IWidgetCreator()
15 myModelWidgetTypes.insert("QtModelWidget");
18 void SamplePanelPlugin_ModelWidgetCreator::widgetTypes(std::set<std::string>& theTypes)
20 theTypes = myModelWidgetTypes;
23 ModuleBase_ModelWidget* SamplePanelPlugin_ModelWidgetCreator::createWidgetByType(const std::string& theType,
25 Config_WidgetAPI* theWidgetApi,
26 ModuleBase_IWorkshop* /*theWorkshop*/)
28 ModuleBase_ModelWidget* aModelWidget = 0;
29 if (myModelWidgetTypes.find(theType) == myModelWidgetTypes.end())
32 if (theType == "QtModelWidget") {
33 aModelWidget = new SamplePanelPlugin_ModelWidget(theParent, theWidgetApi);