00001 // 00002 // VUMeter class 00003 // 00004 00005 // Copyright (c) 2001 Camilo Mesias 00006 // camilo@mesias.co.uk 00007 // 00008 // This program is free software; you can redistribute it and/or 00009 // modify it under the terms of the GNU General Public License 00010 // as published by the Free Software Foundation; either version 2 00011 // of the License, or (at your option) any later version. 00012 // 00013 // This program is distributed in the hope that it will be useful, 00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 // GNU General Public License for more details. 00017 // 00018 // You should have received a copy of the GNU General Public License 00019 // along with this program; if not, write to the Free Software 00020 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00021 00022 #ifndef __VUMETER_H 00023 #define __VUMETER_H 00024 00025 #include <qwidget.h> 00026 #include <qstring.h> 00027 #include <qpixmap.h> 00028 00029 class VUMeter : public QWidget { 00030 00031 Q_OBJECT 00032 00033 private: 00034 int vuvalue; 00035 QString Lannot; 00036 QString Rannot; 00037 00038 QPixmap *pix; 00039 00040 protected: 00041 void paintEvent(QPaintEvent *); 00042 void bupdate(); 00043 void vupdate(); 00044 00045 public: 00046 VUMeter(QWidget *parent=0, const char *name=0); 00047 ~VUMeter(); 00048 00049 // slots 00050 public slots: 00051 void Value(int x){vuvalue = x; vupdate(); }; 00052 void AnnotL(const QString &s){Lannot = s; bupdate(); }; 00053 void AnnotR(const QString &s){Rannot = s; bupdate(); }; 00054 }; 00055 00056 #endif 00057 00058 00059
1.4.2