superkaramba
graph.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef GRAPH_H
00012 #define GRAPH_H
00013
00014 #include <QPainter>
00015 #include <QColor>
00016
00017 #include "meter.h"
00018
00019 class Graph : public Meter
00020 {
00021 Q_OBJECT
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(int);
00029 int getValue() const
00030 {
00031 return lastValue;
00032 }
00033 void setValue(const QString&);
00034 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
00035 QWidget *widget);
00036
00037 private:
00038 int nbrPoints;
00039 int lastValue;
00040
00041 QVector<int> m_values;
00042 };
00043
00044 #endif // GRAPH_H