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 <tqpainter.h> 00016 #include <tqcolor.h> 00017 00018 class Graph : public Meter 00019 { 00020 Q_OBJECT 00021 00022 00023 public: 00024 Graph(karamba* k, int ix, int iy, int iw, int ih, int nbrPoints); 00025 Graph(); 00026 ~Graph(); 00027 00028 void setValue( long ); 00029 long getValue() { return lastValue; }; 00030 void setValue( TQString ); 00031 void mUpdate( TQPainter * ); 00032 00033 private: 00034 int lastValue; 00035 int* values; 00036 int nbrPoints; 00037 int ptPtr; // points to the array position 00038 }; 00039 00040 #endif // GRAPH_H