defuze.me
Client
|
00001 /************************************************************************** 00002 ** defuze.me Epitech Innovative Project 00003 ** 00004 ** Copyright 2010-2011 00005 ** Athena Calmettes - Jocelyn De La Rosa - Francois Gaillard 00006 ** Adrien Jarthon - Alexandre Moore - Luc Peres - Arnaud Sellier 00007 ** 00008 ** All rights reserved. 00009 **************************************************************************/ 00010 00011 #ifndef VUMETERDISPLAY_HPP 00012 #define VUMETERDISPLAY_HPP 00013 00014 #include <QGLWidget> 00015 #include <QMutex> 00016 00017 class VUMeterDisplay : public QWidget 00018 { 00019 Q_OBJECT 00020 00021 public: 00022 VUMeterDisplay(QWidget *parent = 0); 00023 void setLevel(double level); 00024 /* void initializeGL(); 00025 void resizeGL(int w, int h); 00026 void paintGL();*/ 00027 void paintEvent(QPaintEvent *); 00028 void resizeEvent(QResizeEvent *); 00029 00030 signals: 00031 00032 public slots: 00033 00034 private slots: 00035 void refresh(); 00036 00037 private: 00038 double level; 00039 double peak; 00040 int peakDuration; 00041 QPainter painter; 00042 QLinearGradient gradient; 00043 QMutex mutex; 00044 }; 00045 00046 #endif // VUMETERDISPLAY_HPP