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(
24 const std::string& theType,
26 Config_WidgetAPI* theWidgetApi,
27 ModuleBase_IWorkshop* /*theWorkshop*/)
29 ModuleBase_ModelWidget* aModelWidget = 0;
30 if (myModelWidgetTypes.find(theType) == myModelWidgetTypes.end())
33 if (theType == "QtModelWidget") {
34 aModelWidget = new SamplePanelPlugin_ModelWidget(theParent, theWidgetApi);