graph.h

00001 /***************************************************************************
00002  *   Copyright (C) 2003 by Hans Karlsson                                   *
00003  *   karlsson.h@home.se                                                      *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  ***************************************************************************/
00010 
00011 #ifndef GRAPH_H
00012 #define GRAPH_H
00013 
00014 #include "meter.h"
00015 #include <qpainter.h>
00016 #include <qcolor.h>
00017 
00018 class Graph : public Meter
00019 {
00020 Q_OBJECT
00021 
00022 public:
00023   Graph(karamba* k, int ix, int iy, int iw, int ih, int nbrPoints);
00024   Graph();
00025   ~Graph();
00026 
00027   void setValue( int );
00028   int getValue() { return lastValue; };
00029   void setValue( QString );
00030   void mUpdate( QPainter * );
00031 
00032 private:
00033   int lastValue;
00034   int* values;
00035   int nbrPoints;
00036   int ptPtr;  // points to the array position
00037 };
00038 
00039 #endif // GRAPH_H
KDE Home | KDE Accessibility Home | Description of Access Keys