Salome HOME
Plugin for the folowing task: 3.4 Construction of vertices, edges and faces from...
[modules/shaper.git] / src / SketchShapePlugin / SketchShapePlugin_Plugin.cpp
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 // File:        SketchShapePlugin_Plugin.cpp
4 // Created:     25 Nov 2015
5 // Author:      Natalia ERMOLAEVA
6
7 #include <SketchShapePlugin_Plugin.h>
8 #include <SketchShapePlugin_Validators.h>
9 #include <SketchShapePlugin_Feature.h>
10 /*
11 #include <SketchShapePlugin_PageGroupBox.h>
12
13 #include <Events_Loop.h>
14 */
15 #include <ModelAPI_Session.h>
16 #include <ModelAPI_Document.h>
17 #include <ModelAPI_Validator.h>
18 /*#include <ModelAPI_Data.h>
19
20 #include <ModuleBase_ModelWidget.h>
21 #include <qwidget.h>
22
23 #include <memory>*/
24
25 // the only created instance of this plugin
26 //static SketchShapePlugin_Plugin* MY_SKETCH_SHAPE_INSTANCE = new SketchShapePlugin_Plugin();
27
28 SketchShapePlugin_Plugin::SketchShapePlugin_Plugin()
29 {
30   SessionPtr aMgr = ModelAPI_Session::get();
31   ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
32   aFactory->registerValidator("SketchShapePlugin_FeatureValidator",
33                               new SketchShapePlugin_FeatureValidator);
34
35   // register this plugin
36   ModelAPI_Session::get()->registerPlugin(this);
37 }
38
39 FeaturePtr SketchShapePlugin_Plugin::createFeature(std::string theFeatureID)
40 {
41   if (theFeatureID == SketchShapePlugin_Feature::ID()) {
42     return FeaturePtr(new SketchShapePlugin_Feature);
43   }
44   // feature of such kind is not found
45   return FeaturePtr();
46 }
47
48 /*ModuleBase_ModelWidget* SketchShapePlugin_Plugin::createWidgetByType(const std::string& theType,
49                                                                      QWidget* theParent)
50 {
51   ModuleBase_ModelWidget* aWidget = 0;
52   if (theType == "sketchshape_groupbox")
53     aWidget = new SketchShapePlugin_PageGroupBox(theParent);
54   return aWidget;
55 }*/
56