-// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE\r
-//\r
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,\r
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS\r
-//\r
-// This library is free software; you can redistribute it and/or\r
-// modify it under the terms of the GNU Lesser General Public\r
-// License as published by the Free Software Foundation; either\r
-// version 2.1 of the License.\r
-//\r
-// This library is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
-// Lesser General Public License for more details.\r
-//\r
-// You should have received a copy of the GNU Lesser General Public\r
-// License along with this library; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-//\r
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com\r
-//\r
-// File : Plot2d_Algorithm.cxx\r
-\r
-#include "Plot2d_Algorithm.h"\r
-\r
-/*!\r
- Constructor\r
-*/\r
-Plot2d_Algorithm::Plot2d_Algorithm(QObject *parent) :\r
- QObject(parent),\r
- myDataChanged(false)\r
-{\r
-}\r
-\r
-/*!\r
- Destructor\r
-*/\r
-Plot2d_Algorithm::~Plot2d_Algorithm()\r
-{\r
-}\r
-\r
-/*!\r
- Sets input data values\r
-*/\r
-void Plot2d_Algorithm::setInput(AlgoPlot2dInputData theInuptData)\r
-{\r
- clear();\r
- myInuptData = theInuptData;\r
- myDataChanged = true;\r
-}\r
-\r
-/*!\r
- Gets result data values\r
-*/\r
-AlgoPlot2dOutputData Plot2d_Algorithm::getOutput()\r
-{\r
- return myResultData;\r
-}\r
-\r
-/*!\r
- Check the data values changed\r
-*/\r
-bool Plot2d_Algorithm::isDataChanged()\r
-{\r
- return myDataChanged;\r
-}\r
-\r
-\r
-void Plot2d_Algorithm::clear() {\r
- myDataChanged=false;\r
- myInuptData.clear();\r
- myResultData.clear();\r
-}
\ No newline at end of file
+// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// 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.
+//
+// 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
+//
+// File : Plot2d_Algorithm.cxx
+
+#include "Plot2d_Algorithm.h"
+
+/*!
+ Constructor
+*/
+Plot2d_Algorithm::Plot2d_Algorithm(QObject *parent) :
+ QObject(parent),
+ myDataChanged(false)
+{
+}
+
+/*!
+ Destructor
+*/
+Plot2d_Algorithm::~Plot2d_Algorithm()
+{
+}
+
+/*!
+ Sets input data values
+*/
+void Plot2d_Algorithm::setInput(AlgoPlot2dInputData theInuptData)
+{
+ clear();
+ myInuptData = theInuptData;
+ myDataChanged = true;
+}
+
+/*!
+ Gets result data values
+*/
+AlgoPlot2dOutputData Plot2d_Algorithm::getOutput()
+{
+ return myResultData;
+}
+
+/*!
+ Check the data values changed
+*/
+bool Plot2d_Algorithm::isDataChanged()
+{
+ return myDataChanged;
+}
+
+void Plot2d_Algorithm::clear() {
+ myDataChanged=false;
+ myInuptData.clear();
+ myResultData.clear();
+}
-// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE\r
-//\r
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,\r
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS\r
-//\r
-// This library is free software; you can redistribute it and/or\r
-// modify it under the terms of the GNU Lesser General Public\r
-// License as published by the Free Software Foundation; either\r
-// version 2.1 of the License.\r
-//\r
-// This library is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
-// Lesser General Public License for more details.\r
-//\r
-// You should have received a copy of the GNU Lesser General Public\r
-// License along with this library; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-//\r
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com\r
-//\r
-// File : Plot2d_Algorithm.h\r
-\r
-#ifndef PLOT2D_ALGORITHM_H\r
-#define PLOT2D_ALGORITHM_H\r
-\r
-#include "Plot2d.h"\r
-\r
-#include <QPair>\r
-#include <QList>\r
-#include <QMap>\r
-\r
-class Plot2d_Object;\r
-\r
-typedef QList< QPair<double,double> > AlgoPlot2dItem;\r
-typedef QList<Plot2d_Object*> AlgoPlot2dInputData;\r
-typedef QMap<Plot2d_Object*,AlgoPlot2dItem> AlgoPlot2dOutputData;\r
-\r
-class PLOT2D_EXPORT Plot2d_Algorithm : public QObject {\r
- Q_OBJECT\r
-public:\r
- Plot2d_Algorithm(QObject *parent = 0);\r
- ~Plot2d_Algorithm();\r
-\r
- void setInput(AlgoPlot2dInputData);\r
- AlgoPlot2dOutputData getOutput();\r
- virtual void execute() = 0;\r
- virtual void clear();\r
-\r
- bool isDataChanged();\r
-\r
-protected:\r
- AlgoPlot2dInputData myInuptData;\r
- AlgoPlot2dOutputData myResultData;\r
- bool myDataChanged;\r
-};\r
-\r
-#endif //PLOT2D_ALGORITHM_H\r
+// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// 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.
+//
+// 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
+//
+// File : Plot2d_Algorithm.h
+
+#ifndef PLOT2D_ALGORITHM_H
+#define PLOT2D_ALGORITHM_H
+
+#include "Plot2d.h"
+
+#include <QPair>
+#include <QList>
+#include <QMap>
+
+class Plot2d_Object;
+
+typedef QList< QPair<double,double> > AlgoPlot2dItem;
+typedef QList<Plot2d_Object*> AlgoPlot2dInputData;
+typedef QMap<Plot2d_Object*,AlgoPlot2dItem> AlgoPlot2dOutputData;
+
+class PLOT2D_EXPORT Plot2d_Algorithm : public QObject {
+ Q_OBJECT
+public:
+ Plot2d_Algorithm(QObject *parent = 0);
+ ~Plot2d_Algorithm();
+
+ void setInput(AlgoPlot2dInputData);
+ AlgoPlot2dOutputData getOutput();
+ virtual void execute() = 0;
+ virtual void clear();
+
+ bool isDataChanged();
+
+protected:
+ AlgoPlot2dInputData myInuptData;
+ AlgoPlot2dOutputData myResultData;
+ bool myDataChanged;
+};
+
+#endif //PLOT2D_ALGORITHM_H
-// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE\r
-//\r
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,\r
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS\r
-//\r
-// This library is free software; you can redistribute it and/or\r
-// modify it under the terms of the GNU Lesser General Public\r
-// License as published by the Free Software Foundation; either\r
-// version 2.1 of the License.\r
-//\r
-// This library is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
-// Lesser General Public License for more details.\r
-//\r
-// You should have received a copy of the GNU Lesser General Public\r
-// License along with this library; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-//\r
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com\r
-//\r
-// File : Plot2d_NormalizeAlgorithm.cxx\r
-\r
-#include "Plot2d_NormalizeAlgorithm.h"\r
-#include <QMap>\r
-#include <algorithm>\r
-#include "Plot2d_Object.h"\r
-\r
-/*!\r
- Constructor\r
-*/\r
-Plot2d_NormalizeAlgorithm::Plot2d_NormalizeAlgorithm(QObject *parent) :\r
- Plot2d_Algorithm(parent),\r
- myNormalizationMode(NormalizeNone)\r
-{\r
-}\r
-\r
-/*!\r
- Destructor\r
-*/\r
-Plot2d_NormalizeAlgorithm::~Plot2d_NormalizeAlgorithm()\r
-{\r
-}\r
-\r
-/*!\r
- Sets normalozation mode\r
-*/\r
-void Plot2d_NormalizeAlgorithm::setNormalizationMode(NormalizationMode theMode) {\r
- if(myNormalizationMode != theMode) {\r
- myNormalizationMode = theMode;\r
- myDataChanged = true;\r
- }\r
-}\r
-\r
-/*!\r
- Gets normalozation mode\r
-*/\r
-Plot2d_NormalizeAlgorithm::NormalizationMode Plot2d_NormalizeAlgorithm::getNormalizationMode()const {\r
- return myNormalizationMode;\r
-}\r
-\r
-/*!\r
- Gets k normalization coefficient\r
-*/\r
-double Plot2d_NormalizeAlgorithm::getKkoef(Plot2d_Object* theObj) \r
-{\r
- QMap<Plot2d_Object*,double>::iterator it = myKkoefs.find(theObj);\r
- if(it != myKkoefs.end())\r
- return it.value();\r
- return 0;\r
-}\r
-\r
-/*!\r
- Gets b normalization coefficient\r
-*/\r
-double Plot2d_NormalizeAlgorithm::getBkoef(Plot2d_Object* theObj)\r
-{\r
- QMap<Plot2d_Object*,double>::iterator it = myBkoefs.find(theObj);\r
- if(it != myBkoefs.end())\r
- return it.value();\r
- return 0;\r
-\r
-}\r
-\r
-void Plot2d_NormalizeAlgorithm::execute() {\r
- if (!isDataChanged() || myInuptData.isEmpty())\r
- return;\r
-\r
- if (myNormalizationMode != NormalizeNone) {\r
- QList<double> yMinLst, yMaxLst;\r
- QList<double> aKkoefs,aBkoefs;\r
- double _pMin, _pMax;\r
- for (int i = 0; i < myInuptData.size(); ++i) {\r
- QList<double> aTmpItemValues;\r
- Plot2d_Object* object = myInuptData.at(i);\r
- double *x, *y;\r
- long nb = object->getData( &x, &y );\r
- for (int j = 0; j < nb; ++j) {\r
- aTmpItemValues<<object->getPoint(j).y;\r
- }\r
- delete x;\r
- delete y;\r
- yMaxLst<<*(std::max_element(aTmpItemValues.begin(), aTmpItemValues.end()));\r
- yMinLst<<*(std::min_element(aTmpItemValues.begin(), aTmpItemValues.end()));\r
- }\r
- _pMin = *(std::min_element(yMinLst.begin(), yMinLst.end()));\r
- _pMax = *(std::max_element(yMaxLst.begin(), yMaxLst.end()));\r
-\r
- double pMin, pMax, kKoef, bKoef, yMin, yMax;\r
- switch( getNormalizationMode() ) {\r
- case NormalizeToMin:\r
- pMin = _pMin;\r
- for (int i = 0; i < yMaxLst.size(); ++i) {\r
- yMin = yMinLst.at(i);\r
- yMax = yMaxLst.at(i); \r
- pMax = yMax;\r
- kKoef = (pMax - pMin)/(yMax - yMin);\r
- bKoef = pMin - kKoef * yMin;\r
- aBkoefs<<bKoef;\r
- aKkoefs<<kKoef;\r
- }\r
- break;\r
- case NormalizeToMax:\r
- pMax = _pMax;\r
- for (int i = 0; i < yMaxLst.size(); ++i) {\r
- yMin = yMinLst.at(i);\r
- yMax = yMaxLst.at(i); \r
- pMin = yMin;\r
- kKoef = (pMax - pMin)/(yMax - yMin);\r
- bKoef = pMin - kKoef * yMin;\r
- aBkoefs<<bKoef;\r
- aKkoefs<<kKoef;\r
- }\r
- break;\r
- case NormalizeToMinMax:\r
- pMax = _pMax;\r
- pMin = _pMin;\r
- for (int i = 0; i < yMaxLst.size(); ++i) {\r
- yMin = yMinLst.at(i);\r
- yMax = yMaxLst.at(i); \r
- kKoef = (pMax - pMin)/(yMax - yMin);\r
- bKoef = pMin - kKoef * yMin;\r
- aBkoefs<<bKoef;\r
- aKkoefs<<kKoef;\r
- }\r
- break;\r
- }\r
-\r
- for (int i = 0; i < myInuptData.size(); ++i) {\r
- double yOld,xOld,yNew;\r
- AlgoPlot2dItem tmpItem;\r
- for (int j = 0; j < myInuptData.at(i)->nbPoints(); ++j) {\r
- yOld = myInuptData.at(i)->getPoint(j).y;\r
- xOld = myInuptData.at(i)->getPoint(j).x;\r
- yNew = aKkoefs.at(i) * yOld + aBkoefs.at(i);\r
- tmpItem.append( qMakePair(xOld, yNew) );\r
- }\r
- myResultData.insert(myInuptData.at(i),tmpItem);\r
- myKkoefs.insert(myInuptData.at(i),aKkoefs.at(i));\r
- myBkoefs.insert(myInuptData.at(i),aBkoefs.at(i));\r
- }\r
- } else {\r
- for (int i = 0; i < myInuptData.size(); ++i) {\r
- double yOld,xOld;\r
- AlgoPlot2dItem tmpItem;\r
- for (int j = 0; j < myInuptData.at(i)->nbPoints(); ++j) {\r
- yOld = myInuptData.at(i)->getPoint(j).y;\r
- xOld = myInuptData.at(i)->getPoint(j).x;\r
- tmpItem.append( qMakePair(xOld, yOld) );\r
- }\r
- myResultData.insert(myInuptData.at(i),tmpItem);\r
- }\r
-\r
- }\r
- myDataChanged = false; \r
-}\r
-\r
-\r
-void Plot2d_NormalizeAlgorithm::clear() {\r
- Plot2d_Algorithm::clear();\r
- myBkoefs.clear();\r
- myKkoefs.clear();\r
-}
\ No newline at end of file
+// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// 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.
+//
+// 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
+//
+// File : Plot2d_NormalizeAlgorithm.cxx
+
+#include "Plot2d_NormalizeAlgorithm.h"
+#include <QMap>
+#include <algorithm>
+#include "Plot2d_Object.h"
+
+/*!
+ Constructor
+*/
+Plot2d_NormalizeAlgorithm::Plot2d_NormalizeAlgorithm(QObject *parent) :
+ Plot2d_Algorithm(parent),
+ myNormalizationMode(NormalizeNone)
+{
+}
+
+/*!
+ Destructor
+*/
+Plot2d_NormalizeAlgorithm::~Plot2d_NormalizeAlgorithm()
+{
+}
+
+/*!
+ Sets normalozation mode
+*/
+void Plot2d_NormalizeAlgorithm::setNormalizationMode(NormalizationMode theMode) {
+ if(myNormalizationMode != theMode) {
+ myNormalizationMode = theMode;
+ myDataChanged = true;
+ }
+}
+
+/*!
+ Gets normalozation mode
+*/
+Plot2d_NormalizeAlgorithm::NormalizationMode Plot2d_NormalizeAlgorithm::getNormalizationMode()const {
+ return myNormalizationMode;
+}
+
+/*!
+ Gets k normalization coefficient
+*/
+double Plot2d_NormalizeAlgorithm::getKkoef(Plot2d_Object* theObj)
+{
+ QMap<Plot2d_Object*,double>::iterator it = myKkoefs.find(theObj);
+ if(it != myKkoefs.end())
+ return it.value();
+ return 0;
+}
+
+/*!
+ Gets b normalization coefficient
+*/
+double Plot2d_NormalizeAlgorithm::getBkoef(Plot2d_Object* theObj)
+{
+ QMap<Plot2d_Object*,double>::iterator it = myBkoefs.find(theObj);
+ if(it != myBkoefs.end())
+ return it.value();
+ return 0;
+
+}
+
+void Plot2d_NormalizeAlgorithm::execute() {
+ if (!isDataChanged() || myInuptData.isEmpty())
+ return;
+
+ if (myNormalizationMode != NormalizeNone) {
+ QList<double> yMinLst, yMaxLst;
+ QList<double> aKkoefs,aBkoefs;
+ double _pMin, _pMax;
+ for (int i = 0; i < myInuptData.size(); ++i) {
+ QList<double> aTmpItemValues;
+ Plot2d_Object* object = myInuptData.at(i);
+ double *x, *y;
+ long nb = object->getData( &x, &y );
+ for (int j = 0; j < nb; ++j) {
+ aTmpItemValues<<object->getPoint(j).y;
+ }
+ delete x;
+ delete y;
+ yMaxLst<<*(std::max_element(aTmpItemValues.begin(), aTmpItemValues.end()));
+ yMinLst<<*(std::min_element(aTmpItemValues.begin(), aTmpItemValues.end()));
+ }
+ _pMin = *(std::min_element(yMinLst.begin(), yMinLst.end()));
+ _pMax = *(std::max_element(yMaxLst.begin(), yMaxLst.end()));
+
+ double pMin, pMax, kKoef, bKoef, yMin, yMax;
+ switch( getNormalizationMode() ) {
+ case NormalizeToMin:
+ pMin = _pMin;
+ for (int i = 0; i < yMaxLst.size(); ++i) {
+ yMin = yMinLst.at(i);
+ yMax = yMaxLst.at(i);
+ pMax = yMax;
+ kKoef = (pMax - pMin)/(yMax - yMin);
+ bKoef = pMin - kKoef * yMin;
+ aBkoefs<<bKoef;
+ aKkoefs<<kKoef;
+ }
+ break;
+ case NormalizeToMax:
+ pMax = _pMax;
+ for (int i = 0; i < yMaxLst.size(); ++i) {
+ yMin = yMinLst.at(i);
+ yMax = yMaxLst.at(i);
+ pMin = yMin;
+ kKoef = (pMax - pMin)/(yMax - yMin);
+ bKoef = pMin - kKoef * yMin;
+ aBkoefs<<bKoef;
+ aKkoefs<<kKoef;
+ }
+ break;
+ case NormalizeToMinMax:
+ pMax = _pMax;
+ pMin = _pMin;
+ for (int i = 0; i < yMaxLst.size(); ++i) {
+ yMin = yMinLst.at(i);
+ yMax = yMaxLst.at(i);
+ kKoef = (pMax - pMin)/(yMax - yMin);
+ bKoef = pMin - kKoef * yMin;
+ aBkoefs<<bKoef;
+ aKkoefs<<kKoef;
+ }
+ break;
+ }
+
+ for (int i = 0; i < myInuptData.size(); ++i) {
+ double yOld,xOld,yNew;
+ AlgoPlot2dItem tmpItem;
+ for (int j = 0; j < myInuptData.at(i)->nbPoints(); ++j) {
+ yOld = myInuptData.at(i)->getPoint(j).y;
+ xOld = myInuptData.at(i)->getPoint(j).x;
+ yNew = aKkoefs.at(i) * yOld + aBkoefs.at(i);
+ tmpItem.append( qMakePair(xOld, yNew) );
+ }
+ myResultData.insert(myInuptData.at(i),tmpItem);
+ myKkoefs.insert(myInuptData.at(i),aKkoefs.at(i));
+ myBkoefs.insert(myInuptData.at(i),aBkoefs.at(i));
+ }
+ } else {
+ for (int i = 0; i < myInuptData.size(); ++i) {
+ double yOld,xOld;
+ AlgoPlot2dItem tmpItem;
+ for (int j = 0; j < myInuptData.at(i)->nbPoints(); ++j) {
+ yOld = myInuptData.at(i)->getPoint(j).y;
+ xOld = myInuptData.at(i)->getPoint(j).x;
+ tmpItem.append( qMakePair(xOld, yOld) );
+ }
+ myResultData.insert(myInuptData.at(i),tmpItem);
+ }
+ }
+ myDataChanged = false;
+}
+
+
+void Plot2d_NormalizeAlgorithm::clear() {
+ Plot2d_Algorithm::clear();
+ myBkoefs.clear();
+ myKkoefs.clear();
+}
-// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE\r
-//\r
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,\r
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS\r
-//\r
-// This library is free software; you can redistribute it and/or\r
-// modify it under the terms of the GNU Lesser General Public\r
-// License as published by the Free Software Foundation; either\r
-// version 2.1 of the License.\r
-//\r
-// This library is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
-// Lesser General Public License for more details.\r
-//\r
-// You should have received a copy of the GNU Lesser General Public\r
-// License along with this library; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-//\r
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com\r
-//\r
-// File : Plot2d_NormalizeAlgorithm.h\r
-\r
-#ifndef PLOT2D_NORMALIZEALGORITHM_H\r
-#define PLOT2D_NORMALIZEALGORITHM_H\r
-\r
-#include "Plot2d.h"\r
-#include "Plot2d_Algorithm.h"\r
-#include <QList>\r
-\r
-class Plot2d_Object;\r
-\r
-class PLOT2D_EXPORT Plot2d_NormalizeAlgorithm : public Plot2d_Algorithm {\r
- Q_OBJECT\r
-public:\r
- Plot2d_NormalizeAlgorithm(QObject *parent);\r
- ~Plot2d_NormalizeAlgorithm();\r
-\r
- enum NormalizationMode { NormalizeToMin, NormalizeToMax, NormalizeToMinMax, NormalizeNone };\r
-\r
- void setNormalizationMode(NormalizationMode);\r
- NormalizationMode getNormalizationMode() const;\r
- double getKkoef(Plot2d_Object*);\r
- double getBkoef(Plot2d_Object*);\r
- virtual void execute();\r
- virtual void clear();\r
-\r
-private: \r
- NormalizationMode myNormalizationMode;\r
- QMap<Plot2d_Object*, double> myBkoefs;\r
- QMap<Plot2d_Object*, double> myKkoefs;\r
-};\r
-\r
-#endif //PLOT2D_NORMALIZEALGORITHM_H\r
+// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// 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.
+//
+// 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
+//
+// File : Plot2d_NormalizeAlgorithm.h
+
+#ifndef PLOT2D_NORMALIZEALGORITHM_H
+#define PLOT2D_NORMALIZEALGORITHM_H
+
+#include "Plot2d.h"
+#include "Plot2d_Algorithm.h"
+#include <QList>
+
+class Plot2d_Object;
+
+class PLOT2D_EXPORT Plot2d_NormalizeAlgorithm : public Plot2d_Algorithm {
+ Q_OBJECT
+public:
+ Plot2d_NormalizeAlgorithm(QObject *parent);
+ ~Plot2d_NormalizeAlgorithm();
+
+ enum NormalizationMode { NormalizeToMin, NormalizeToMax, NormalizeToMinMax, NormalizeNone };
+
+ void setNormalizationMode(NormalizationMode);
+ NormalizationMode getNormalizationMode() const;
+ double getKkoef(Plot2d_Object*);
+ double getBkoef(Plot2d_Object*);
+ virtual void execute();
+ virtual void clear();
+
+private:
+ NormalizationMode myNormalizationMode;
+ QMap<Plot2d_Object*, double> myBkoefs;
+ QMap<Plot2d_Object*, double> myKkoefs;
+};
+
+#endif //PLOT2D_NORMALIZEALGORITHM_H