1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: SketchShapePlugin_Plugin.cpp
4 // Created: 25 Nov 2015
5 // Author: Natalia ERMOLAEVA
7 #include <SketchShapePlugin_Plugin.h>
8 #include <SketchShapePlugin_Validators.h>
9 #include <SketchShapePlugin_Feature.h>
11 #include <SketchShapePlugin_PageGroupBox.h>
13 #include <Events_Loop.h>
15 #include <ModelAPI_Session.h>
16 #include <ModelAPI_Document.h>
17 #include <ModelAPI_Validator.h>
18 /*#include <ModelAPI_Data.h>
20 #include <ModuleBase_ModelWidget.h>
25 // the only created instance of this plugin
26 //static SketchShapePlugin_Plugin* MY_SKETCH_SHAPE_INSTANCE = new SketchShapePlugin_Plugin();
28 SketchShapePlugin_Plugin::SketchShapePlugin_Plugin()
30 SessionPtr aMgr = ModelAPI_Session::get();
31 ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
32 aFactory->registerValidator("SketchShapePlugin_FeatureValidator",
33 new SketchShapePlugin_FeatureValidator);
35 // register this plugin
36 ModelAPI_Session::get()->registerPlugin(this);
39 FeaturePtr SketchShapePlugin_Plugin::createFeature(std::string theFeatureID)
41 if (theFeatureID == SketchShapePlugin_Feature::ID()) {
42 return FeaturePtr(new SketchShapePlugin_Feature);
44 // feature of such kind is not found
48 /*ModuleBase_ModelWidget* SketchShapePlugin_Plugin::createWidgetByType(const std::string& theType,
51 ModuleBase_ModelWidget* aWidget = 0;
52 if (theType == "sketchshape_groupbox")
53 aWidget = new SketchShapePlugin_PageGroupBox(theParent);