Mixxx

/home/maxime/Projets/Mixxx/1.10/mixxx/src/vinylcontrol/vinylcontrolsignalwidget.h

Go to the documentation of this file.
00001 /*
00002  * vinylcontrolsignalwidget.h
00003  *
00004  *  Created on: 5-Jul-2008
00005  *      Author: asantoni
00006  */
00007 
00008 #ifndef VINYLCONTROLSIGNALWIDGET_H_
00009 #define VINYLCONTROLSIGNALWIDGET_H_
00010 
00011 #include <QtGui>
00012 #include <QPainter>
00013 #include <QTimerEvent>
00014 
00015 class VinylControlProxy;
00016 
00017 enum VinylControlSignalType {
00018     VINYLCONTROL_SIGQUALITY = 0,
00019     VINYLCONTROL_SIGLEFTCHANNEL,
00020     VINYLCONTROL_SIGRIGHTCHANNEL,
00021     VINYLCONTROL_SIGTYPE_NUM
00022 };
00023 
00024 class VinylControlSignalWidget : public QWidget
00025 {
00026     Q_OBJECT
00027 public:
00028     VinylControlSignalWidget();
00029     VinylControlSignalWidget(int size);
00030     ~VinylControlSignalWidget();
00031     void setVinylControlProxy(VinylControlProxy* vc);
00032     void paintEvent(QPaintEvent* event);
00033     void setSize(int size);
00034     void setVinylActive(bool active);
00035 
00036     void resetWidget();
00037     void startDrawing();
00038     void stopDrawing();
00039 
00040 public slots:
00041     void invalidateVinylControl();
00042 
00043 protected:
00044     void timerEvent(QTimerEvent* event);
00045 
00046 private:
00047     QMutex m_controlLock;
00048     VinylControlProxy* m_pVinylControl;
00049 
00050     float m_fRMSvolumeSum[VINYLCONTROL_SIGTYPE_NUM];
00051     float m_fRMSvolume[VINYLCONTROL_SIGTYPE_NUM];
00052     long m_samplesCalculated[VINYLCONTROL_SIGTYPE_NUM];
00053 
00054     int m_iTimerId;
00055     int m_iSize;
00056 
00057     QImage m_qImage;
00058     unsigned char * m_imageData;
00059     int m_iAngle;
00060     float m_fSignalQuality;
00061     bool m_bVinylActive;
00062 };
00063 
00064 #endif /* VINYLCONTROLSIGNALWIDGET_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines