bar.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef BAR_H
00011 #define BAR_H
00012
00013 #include "meter.h"
00014 #include <qpixmap.h>
00015 #include <qstring.h>
00016 #include <qpainter.h>
00017
00018 class Bar : public Meter
00019 {
00020 Q_OBJECT
00021 public:
00022 Bar(karamba* k,int ix,int iy,int iw,int ih );
00023 ~Bar();
00024
00025 void mUpdate( QPainter * );
00026
00027 virtual void setMax( int m );
00028 virtual void setMin( int m );
00029
00030 public slots:
00031 bool setImage( QString imagePath );
00032 QString getImage() { return imagePath; };
00033
00034 void setValue( int );
00035 int getValue() { return barValue; };
00036 void setValue( QString );
00037 void recalculateValue() {setValue(barValue); };
00038
00039 void setVertical( bool );
00040 int getVertical() { return vertical; };
00041
00042 private:
00043 int barValue;
00044 int value;
00045
00046 int pixmapWidth;
00047 int pixmapHeight;
00048
00049 bool vertical;
00050
00051 QString imagePath;
00052 QPixmap pixmap;
00053 }
00054 ;
00055 #endif // BAR_H
|