Salome HOME
Fixed too long line
[modules/shaper.git] / src / ParametersPlugin / ParametersPlugin_Plugin.cpp
index e80aa1b69c32e47652491f31936e6f435c11aa7f..6b8abd247a68f5aa6ffbc06ec91ed65482276b99 100644 (file)
@@ -1,8 +1,31 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+// Copyright (C) 2014-2020  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include <pyconfig.h>
 
 #include <ParametersPlugin_Plugin.h>
 #include <ParametersPlugin_Parameter.h>
+#include <ParametersPlugin_ParametersMgr.h>
 #include <ParametersPlugin_Validators.h>
+#include <ParametersPlugin_WidgetCreator.h>
+
+#include <ModuleBase_WidgetCreatorFactory.h>
 
 #include <ModelAPI_Session.h>
 #include <ModelAPI_Validator.h>
@@ -15,6 +38,10 @@ static ParametersPlugin_Plugin* MY_PARAMETERSPLUGIN_INSTANCE = new ParametersPlu
 ParametersPlugin_Plugin::ParametersPlugin_Plugin()
 {
   // register this plugin
+  WidgetCreatorFactoryPtr aWidgetCreatorFactory = ModuleBase_WidgetCreatorFactory::get();
+  aWidgetCreatorFactory->registerCreator(
+   std::shared_ptr<ParametersPlugin_WidgetCreator>(new ParametersPlugin_WidgetCreator()));
+
   SessionPtr aSession = ModelAPI_Session::get();
   aSession->registerPlugin(this);
 
@@ -24,7 +51,8 @@ ParametersPlugin_Plugin::ParametersPlugin_Plugin()
   aFactory->registerValidator("Parameters_ExpressionValidator",
                               new ParametersPlugin_ExpressionValidator);
 
-  myEvalListener = std::shared_ptr<ParametersPlugin_EvalListener>(new ParametersPlugin_EvalListener());
+  myEvalListener =
+    std::shared_ptr<ParametersPlugin_EvalListener>(new ParametersPlugin_EvalListener());
 }
 
 FeaturePtr ParametersPlugin_Plugin::createFeature(std::string theFeatureID)
@@ -33,6 +61,9 @@ FeaturePtr ParametersPlugin_Plugin::createFeature(std::string theFeatureID)
   if (theFeatureID == ParametersPlugin_Parameter::ID()) {
     return FeaturePtr(new ParametersPlugin_Parameter);
   }
+  if (theFeatureID == ParametersPlugin_ParametersMgr::ID()) {
+    return FeaturePtr(new ParametersPlugin_ParametersMgr);
+  }
   return FeaturePtr();
 }