X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPlot2d%2FPlot2d_Object.cxx;h=c9cdf7e4ee5d88129361073ab731e25f96712673;hb=e7ede3527d1022d9df3cc38cd9d00d2eefb9f80f;hp=376a697b19d92fcb1b6c4d061e5b4f569073f6d4;hpb=3593b4d1585d69f34034e5c678dc97b6e92a85cf;p=modules%2Fgui.git diff --git a/src/Plot2d/Plot2d_Object.cxx b/src/Plot2d/Plot2d_Object.cxx index 376a697b1..c9cdf7e4e 100755 --- a/src/Plot2d/Plot2d_Object.cxx +++ b/src/Plot2d/Plot2d_Object.cxx @@ -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 @@ -25,28 +25,10 @@ #include "Plot2d_Object.h" - -#include -#include - // 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 ); }