-// 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
// 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
return;
if ( theItem->yAxis() != getYAxis() || theItem->xAxis() != getXAxis() ) {
- theItem->setAxis( getXAxis(), getYAxis() );
+ theItem->setAxes( getXAxis(), getYAxis() );
QwtPlot* aPlot = theItem->plot();
if ( aPlot ) {
}
/*!
- 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 );
}