Mixxx

/home/maxime/Projets/Mixxx/1.10/mixxx/src/widget/wvumeter.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           wvumeter.h  -  description
00003                              -------------------
00004     begin                : Fri Jul 22 2003
00005     copyright            : (C) 2003 by Tue & Ken Haste Andersen
00006     email                : haste@diku.dk
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef WVUMETER_H
00019 #define WVUMETER_H
00020 
00021 #include "wwidget.h"
00022 #include <qpixmap.h>
00023 #include <qstring.h>
00024 //Added by qt3to4:
00025 #include <QPaintEvent>
00026 #include <QTime>
00027 
00032 class WVuMeter : public WWidget  {
00033    Q_OBJECT
00034 public:
00035     WVuMeter(QWidget *parent=0);
00036     ~WVuMeter();
00037     void setup(QDomNode node);
00038     void setPixmaps(const QString &backFilename, const QString &vuFilename, bool bHorizontal=false);
00039     void setValue(double fValue);
00040 
00041 protected slots:
00042     void updateState(int msecsElapsed);
00043 
00044 private:
00046     void resetPositions();
00047     void paintEvent(QPaintEvent *);
00048     void setPeak(int pos);
00049 
00051     int m_iPos;
00053     int m_iNoPos;
00055     QPixmap *m_pPixmapBack, *m_pPixmapVu;
00057     bool m_bHorizontal;
00058 
00059     int m_iPeakHoldSize;
00060     int m_iPeakFallStep;
00061     int m_iPeakHoldTime;
00062     int m_iPeakFallTime;
00063     int m_iPeakPos;
00064     int m_iPeakHoldCountdown;
00065 
00066     QTime m_lastUpdate;
00067 };
00068 
00069 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines