X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FParametersPlugin%2FParametersPlugin_Plugin.cpp;h=b11f2f279e58b27787218a170d8697406b3f92e6;hb=4cb749258f33b7de231da5bb50140407c0599d30;hp=97fa7a9fdd795f27fd0e09d3323f7bce50bebffe;hpb=df901d4270af49bacb374dcb862596e2f88b0c0f;p=modules%2Fshaper.git diff --git a/src/ParametersPlugin/ParametersPlugin_Plugin.cpp b/src/ParametersPlugin/ParametersPlugin_Plugin.cpp index 97fa7a9fd..b11f2f279 100644 --- a/src/ParametersPlugin/ParametersPlugin_Plugin.cpp +++ b/src/ParametersPlugin/ParametersPlugin_Plugin.cpp @@ -1,8 +1,31 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D +// Copyright (C) 2014-2019 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 #include #include +#include #include +#include + +#include #include #include @@ -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(new ParametersPlugin_WidgetCreator())); + SessionPtr aSession = ModelAPI_Session::get(); aSession->registerPlugin(this); @@ -23,6 +50,9 @@ ParametersPlugin_Plugin::ParametersPlugin_Plugin() new ParametersPlugin_VariableValidator); aFactory->registerValidator("Parameters_ExpressionValidator", new ParametersPlugin_ExpressionValidator); + + myEvalListener = + std::shared_ptr(new ParametersPlugin_EvalListener()); } FeaturePtr ParametersPlugin_Plugin::createFeature(std::string theFeatureID) @@ -31,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(); }