Salome HOME
Merge master branch into V9_dev
[modules/gui.git] / src / Plot2d / Plot2d_Object.cxx
index 376a697b19d92fcb1b6c4d061e5b4f569073f6d4..c9cdf7e4ee5d88129361073ab731e25f96712673 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016  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
 
 #include "Plot2d_Object.h"
 
-
-#include <SUIT_Session.h>
-#include <SUIT_ResourceMgr.h>
-
 // Static members
 QColor Plot2d_Object::mySelectionColor;
 QColor Plot2d_Object::myHighlightedLegendTextColor;
 
-/*
- * Read colors from the resource manager.
-*/
-void Plot2d_Object::initColors() {
-  SUIT_Session* session = SUIT_Session::session();
-  if(!session)
-    return;
-
-  SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
-  if(resMgr) {
-    mySelectionColor = resMgr->colorValue( "Plot2d", "SelectionColor", QColor(80,80,80) );
-    myHighlightedLegendTextColor = resMgr->colorValue( "Plot2d", "SelectedLegendFontColor", QColor(255,255,255) );
-  }
-}
 
 /*!
   Constructor
@@ -121,7 +103,7 @@ void Plot2d_Object::updatePlotItem( QwtPlotItem* theItem )
     return;
 
   if ( theItem->yAxis() != getYAxis() || theItem->xAxis() != getXAxis() ) {
-    theItem->setAxis( getXAxis(), getYAxis() );
+    theItem->setAxes( getXAxis(), getYAxis() );
 
     QwtPlot* aPlot = theItem->plot();
     if ( aPlot ) {
@@ -315,12 +297,12 @@ void Plot2d_Object::setPointList( const pointList& points )
 }
 
 /*!
-  Sets object's data. 
+  Sets object's data.
 */
 void Plot2d_Object::setData( const double* hData, const double* vData, long size, const QStringList& lst )
 {
   clearAllPoints();
-  QStringList::const_iterator anIt = lst.begin(), aLast = lst.end(); 
+  QStringList::const_iterator anIt = lst.begin(), aLast = lst.end();
   for ( long i = 0; i < size; i++, anIt++ )
     addPoint( hData[i], vData[i], anIt==aLast ? QString() : *anIt );
 }