moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / libkdeedu / kdeeduplot / kplotobject.cpp
blob54f6dab77edd31e30b21fdc587eb76bb9067ff7c
1 /***************************************************************************
2 kplotobject.cpp - A list of points to be plotted
3 -------------------
4 begin : Sun 18 May 2003
5 copyright : (C) 2003 by Jason Harris
6 email : kstars@30doradus.org
7 ***************************************************************************/
9 /***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
18 #include <qpainter.h>
19 #include <kdebug.h>
20 #include <klocale.h>
21 #include "kplotobject.h"
23 KPlotObject::KPlotObject() {
24 KPlotObject( "", "white", POINTS );
27 KPlotObject::KPlotObject( const QString &n, const QString &c, PTYPE t, unsigned int s, unsigned int p ) {
28 //We use the set functions because they may include data validation
29 setName( n );
30 setColor( c );
31 setType( t );
32 setSize( s );
33 setParam( p );
35 pList.setAutoDelete( TRUE );
38 KPlotObject::~KPlotObject()
42 void KPlotObject::removePoint( unsigned int index ) {
43 if ( index > pList.count() - 1 ) {
44 kdWarning() << i18n( "Ignoring attempt to remove non-existent plot object" ) << endl;
45 return;
48 pList.remove( index );