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