Salome HOME
Merge branch V7_3_1_BR
[modules/gui.git] / src / Plot2d / Plot2d_ViewFrame.cxx
index 083f80bcee579b2931bd53ba1a97b23ce3b95d2a..a52a6ab9920cad7859601be58d22cd2b6482c500 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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
@@ -6,7 +6,7 @@
 // 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.
+// 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
@@ -1849,25 +1849,19 @@ void Plot2d_ViewFrame::onSettings()
 */
 void Plot2d_ViewFrame::onAnalyticalCurve()
 {
-#ifndef DISABLE_PYCONSOLE
   Plot2d_AnalyticalCurveDlg dlg( this, this );
   dlg.exec();
   updateAnalyticalCurves();
-#endif
 }
 
 void Plot2d_ViewFrame::addAnalyticalCurve( Plot2d_AnalyticalCurve* theCurve)
 {
-#ifndef DISABLE_PYCONSOLE
-       myAnalyticalCurves.append(theCurve);
-#endif
+  myAnalyticalCurves.append(theCurve);
 }
 
 void Plot2d_ViewFrame::removeAnalyticalCurve( Plot2d_AnalyticalCurve* theCurve)
 {
-#ifndef DISABLE_PYCONSOLE
-       theCurve->setAction(Plot2d_AnalyticalCurve::ActRemoveFromView);
-#endif
+  theCurve->setAction(Plot2d_AnalyticalCurve::ActRemoveFromView);
 }
 
 /*
@@ -1875,7 +1869,6 @@ void Plot2d_ViewFrame::removeAnalyticalCurve( Plot2d_AnalyticalCurve* theCurve)
 */
 void Plot2d_ViewFrame::updateAnalyticalCurve(Plot2d_AnalyticalCurve* c, bool updateView)
 {
-#ifndef DISABLE_PYCONSOLE
   if(!c) return;
   QwtScaleDiv div = myPlot->axisScaleDiv(QwtPlot::xBottom);
   c->setRangeBegin(div.lowerBound());
@@ -1916,7 +1909,6 @@ void Plot2d_ViewFrame::updateAnalyticalCurve(Plot2d_AnalyticalCurve* c, bool upd
 
   if(updateView)
     myPlot->replot();
-#endif
 }
 
 /*
@@ -1924,13 +1916,11 @@ void Plot2d_ViewFrame::updateAnalyticalCurve(Plot2d_AnalyticalCurve* c, bool upd
 */
 void Plot2d_ViewFrame::updateAnalyticalCurves()
 {
-#ifndef DISABLE_PYCONSOLE
   AnalyticalCurveList::iterator it = myAnalyticalCurves.begin();
   for( ; it != myAnalyticalCurves.end(); it++) {
     updateAnalyticalCurve(*it);
   }
   myPlot->replot();
-#endif
 }
 
 /*!
@@ -1945,14 +1935,12 @@ AnalyticalCurveList Plot2d_ViewFrame::getAnalyticalCurves() const
   Get analytical curve by plot item.
 */
 Plot2d_AnalyticalCurve* Plot2d_ViewFrame::getAnalyticalCurve(QwtPlotItem * theItem) {
-#ifndef DISABLE_PYCONSOLE
   AnalyticalCurveList::iterator it = myAnalyticalCurves.begin();
   for( ; it != myAnalyticalCurves.end(); it++) {
     if((*it)->plotItem() == theItem);
                return (*it);
   }
   return 0;
-#endif
 }
 #endif