author | llornkcor <llornkcor> | 2005-03-20 04:53:54 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2005-03-20 04:53:54 (UTC) |
commit | 76ec755d83f3143373337de84e3740915adfdc02 (patch) (side-by-side diff) | |
tree | 5beb248f0e923cfb86f0cc15fe94f8b38ac40805 /noncore/multimedia/opierec/vumeter.h | |
parent | c213ec71220b4eb143ba0977c9156de466fb61e7 (diff) | |
download | opie-76ec755d83f3143373337de84e3740915adfdc02.zip opie-76ec755d83f3143373337de84e3740915adfdc02.tar.gz opie-76ec755d83f3143373337de84e3740915adfdc02.tar.bz2 |
add vumeter files
Diffstat (limited to 'noncore/multimedia/opierec/vumeter.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opierec/vumeter.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/noncore/multimedia/opierec/vumeter.h b/noncore/multimedia/opierec/vumeter.h new file mode 100644 index 0000000..e167686 --- a/dev/null +++ b/noncore/multimedia/opierec/vumeter.h @@ -0,0 +1,66 @@ +#ifndef VUMETER_H +#define VUMETER_H + +#include "qtrec.h" +#include <qpainter.h> +#include <qpixmap.h> +#include <qpushbutton.h> + +typedef struct { + bool onOff; + int hold,update,leds,reso; + float resoFactor; +} VUParameters; + +class VUMeter: public QWidget +{ + Q_OBJECT + +public: + VUMeter(QWidget *parent=0, const char *name=0, const int tracks=2); + ~VUMeter(); + VUParameters para; + QTimer *vuTimer; + void startTimer(); + void stopTimer(); +public slots: + void setTracks(int trk) {tracks=trk;}; + void setPeak(int a[]); + void setPeak(float a[]); + void timeSlot(); + void slotOn(); + void slotOff(); + void update(); + void slotProps(); + void resize(); + void readConf(); + void writeConf(); + +signals: + void statusChanged(const char *); + +protected: + + virtual void paintEvent(QPaintEvent*); + virtual void resizeEvent(QResizeEvent*); + virtual void mousePressEvent(QMouseEvent*); + void paint(); +private: + //bool status; + int tracks; +// VUPara para; // dialogs.h + float resoFactor; + int x,y,sx,sy,dx,dy,ox,oy; + float peak[4], hold[4]; + int i_peak[4], i_hold[4]; + int holdTime[4]; + + // VUMeterDialog *dia; + QPixmap *buffer, *warning; /// ? + QPopupMenu *vuProp; + QColor color[37]; + +}; + + +#endif |