diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-11-16 16:06:06 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-11-16 16:06:06 -0600 |
commit | 34784ccef6ac9dd33b4460560c68e5422a73560a (patch) | |
tree | a206e2a4050c2861ce0706a8fd3542ff29e234e1 /libtdeedu/tdeeduplot/kplotobject.cpp | |
parent | 89354dfc31a795bae9415f79bb07b32be643e4f4 (diff) | |
download | tdeedu-34784ccef6ac9dd33b4460560c68e5422a73560a.tar.gz tdeedu-34784ccef6ac9dd33b4460560c68e5422a73560a.zip |
Finish rename from prior commit
Diffstat (limited to 'libtdeedu/tdeeduplot/kplotobject.cpp')
-rw-r--r-- | libtdeedu/tdeeduplot/kplotobject.cpp | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/libtdeedu/tdeeduplot/kplotobject.cpp b/libtdeedu/tdeeduplot/kplotobject.cpp new file mode 100644 index 00000000..b5aaf8d8 --- /dev/null +++ b/libtdeedu/tdeeduplot/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 <tqpainter.h> +#include <kdebug.h> +#include "kplotobject.h" + +KPlotObject::KPlotObject() { + KPlotObject( "", "white", POINTS ); +} + +KPlotObject::KPlotObject( const TQString &n, const TQString &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 ); +} + |