Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

vumeter.h

Go to the documentation of this file.
00001 #ifndef VUMETER_H
00002 #define VUMETER_H
00003 
00004 #include "qtrec.h"
00005 #include <qpainter.h>
00006 #include <qpixmap.h>
00007 #include <qpushbutton.h>
00008 
00009 typedef struct {
00010         bool onOff;
00011         int hold,update,leds,reso;
00012         float resoFactor;
00013 } VUParameters;
00014 
00015 class VUMeter: public QWidget
00016 {
00017   Q_OBJECT
00018 
00019 public:
00020   VUMeter(QWidget *parent=0, const char *name=0, const int tracks=2);
00021   ~VUMeter();
00022         VUParameters para;
00023   QTimer *vuTimer;
00024   void startTimer();
00025   void stopTimer();
00026 public slots:
00027   void setTracks(int trk) {tracks=trk;};
00028   void setPeak(int a[]);
00029   void setPeak(float a[]);
00030   void timeSlot();
00031   void slotOn();
00032   void slotOff();
00033   void update();
00034   void slotProps();
00035   void resize();
00036   void readConf();
00037   void writeConf();
00038 
00039 signals:
00040   void statusChanged(const char *);
00041 
00042 protected:
00043 
00044   virtual void paintEvent(QPaintEvent*);
00045   virtual void resizeEvent(QResizeEvent*);
00046   virtual void mousePressEvent(QMouseEvent*);
00047   void paint();
00048 private:
00049   int tracks, colorScheme;
00050   float resoFactor;
00051   int x,y,sx,sy,dx,dy,ox,oy;
00052   float peak[4], hold[4];
00053   int i_peak[4], i_hold[4];
00054   int holdTime[4];
00055 
00056   QPixmap *buffer, *warning;
00057   QPopupMenu *vuProp;
00058   QColor color[37];
00059 };
00060 
00061 
00062 #endif

Generated on Sat Nov 5 16:17:34 2005 for OPIE by  doxygen 1.4.2