1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: SamplePanelPlugin_WidgetCreator.cpp
4 // Created: 29 Mar 2015
5 // Author: Natalia ERMOLAEVA
7 #include "SamplePanelPlugin_WidgetCreator.h"
9 #include "SamplePanelPlugin_Panel.h"
11 SamplePanelPlugin_WidgetCreator::SamplePanelPlugin_WidgetCreator()
12 : ModuleBase_IWidgetCreator()
14 myPanelTypes.insert("QtPanel");
17 void SamplePanelPlugin_WidgetCreator::panelTypes(std::set<std::string>& theTypes)
19 theTypes = myPanelTypes;
22 QWidget* SamplePanelPlugin_WidgetCreator::createPanelByType(const std::string& theType,
24 const FeaturePtr& theFeature)
27 if (myPanelTypes.find(theType) == myPanelTypes.end())
30 if (theType == "QtPanel") {
31 SamplePanelPlugin_Panel* aPanel = new SamplePanelPlugin_Panel(theParent);
32 aPanel->setFeature(theFeature);