Salome HOME
89552f187a47e4d60f53db5cf148e148da4f1ce5
[modules/shaper.git] / src / SketchShapePlugin / SketchShapePlugin_WidgetCreator.cpp
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 #include "SketchShapePlugin_WidgetCreator.h"
4 #include "SketchShapePlugin_PageGroupBox.h"
5
6 SketchShapePlugin_WidgetCreator::SketchShapePlugin_WidgetCreator()
7 : ModuleBase_IWidgetCreator()
8 {
9   myTypes.insert("sketchshape_groupbox");
10 }
11
12 const std::set<std::string>& SketchShapePlugin_WidgetCreator::widgetTypes()
13 {
14   return myTypes;
15 }
16
17 ModuleBase_ModelWidget* SketchShapePlugin_WidgetCreator::createWidgetByType(
18                                    const std::string& theType, QWidget* theParent)
19 {
20   ModuleBase_ModelWidget* aWidget = 0;
21   if (myTypes.find(theType) != myTypes.end())
22     return aWidget;
23
24   if (theType == "sketchshape_groupbox") {
25     //aWidget = 
26       new SketchShapePlugin_PageGroupBox(theParent);
27   }
28
29   return aWidget;
30 }