diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | ce599e4f9f94b4eb00c1b5edb85bce5431ab3df2 (patch) | |
tree | d3bb9f5d25a2dc09ca81adecf39621d871534297 /libkdeedu/kdeeduplot/kplotobject.cpp | |
download | tdeedu-ce599e4f9f94b4eb00c1b5edb85bce5431ab3df2.tar.gz tdeedu-ce599e4f9f94b4eb00c1b5edb85bce5431ab3df2.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkdeedu/kdeeduplot/kplotobject.cpp')
-rw-r--r-- | libkdeedu/kdeeduplot/kplotobject.cpp | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/libkdeedu/kdeeduplot/kplotobject.cpp b/libkdeedu/kdeeduplot/kplotobject.cpp new file mode 100644 index 00000000..145f12c3 --- /dev/null +++ b/libkdeedu/kdeeduplot/kplotobject.cpp @@ -0,0 +1,49 @@ +/*************************************************************************** + kplotobject.cpp - A list of points to be plotted + ------------------- + begin : Sun 18 May 2003 + copyright : (C) 2003 by Jason Harris + email : kstars@30doradus.org + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include <qpainter.h> +#include <kdebug.h> +#include "kplotobject.h" + +KPlotObject::KPlotObject() { + KPlotObject( "", "white", POINTS ); +} + +KPlotObject::KPlotObject( const QString &n, const QString &c, PTYPE t, unsigned int s, unsigned int p ) { + //We use the set functions because they may include data validation + setName( n ); + setColor( c ); + setType( t ); + setSize( s ); + setParam( p ); + + pList.setAutoDelete( true ); +} + +KPlotObject::~KPlotObject() +{ +} + +void KPlotObject::removePoint( unsigned int index ) { + if ( index > pList.count() - 1 ) { + kdWarning() << "Ignoring attempt to remove non-existent plot object" << endl; + return; + } + + pList.remove( index ); +} + |