#include <ModelAPI_Session.h>
#include <ModelAPI_Document.h>
#include <ModelAPI_Validator.h>
+
+#include <ModuleBase_WidgetCreatorFactory.h>
+#include <SketchShapePlugin_WidgetCreator.h>
/*#include <ModelAPI_Data.h>
#include <ModuleBase_ModelWidget.h>
#include <memory>*/
// the only created instance of this plugin
-//static SketchShapePlugin_Plugin* MY_SKETCH_SHAPE_INSTANCE = new SketchShapePlugin_Plugin();
+static SketchShapePlugin_Plugin* MY_SKETCH_SHAPE_INSTANCE = new SketchShapePlugin_Plugin();
SketchShapePlugin_Plugin::SketchShapePlugin_Plugin()
{
aFactory->registerValidator("SketchShapePlugin_FeatureValidator",
new SketchShapePlugin_FeatureValidator);
+ WidgetCreatorFactoryPtr aWidgetCreatorFactory = ModuleBase_WidgetCreatorFactory::get();
+ aWidgetCreatorFactory->registerCreator(
+ std::shared_ptr<SketchShapePlugin_WidgetCreator>(new SketchShapePlugin_WidgetCreator()));
+
// register this plugin
ModelAPI_Session::get()->registerPlugin(this);
}
return FeaturePtr();
}
-/*ModuleBase_ModelWidget* SketchShapePlugin_Plugin::createWidgetByType(const std::string& theType,
- QWidget* theParent)
-{
- ModuleBase_ModelWidget* aWidget = 0;
- if (theType == "sketchshape_groupbox")
- aWidget = new SketchShapePlugin_PageGroupBox(theParent);
- return aWidget;
-}*/
-