Mixxx

/home/maxime/Projets/Mixxx/1.10/mixxx/src/waveform/glwaveformrenderer.h

Go to the documentation of this file.
00001 
00002 #ifndef GLWAVEFORMRENDERER_H
00003 #define GLWAVEFORMRENDERER_H
00004 
00005 #include <QColor>
00006 #include <QPainter>
00007 #include <QPaintEvent>
00008 #include <QVector>
00009 #include <qgl.h>
00010 
00011 #include "defs.h"
00012 #include "trackinfoobject.h"
00013 
00014 class ControlObjectThreadMain;
00015 class QDomNode;
00016 class WaveformRenderBeat;
00017 class ControlObject;
00018 
00019 class GLWaveformRenderer : public QObject {
00020     Q_OBJECT
00021 public:
00022     GLWaveformRenderer(const char* group);
00023     ~GLWaveformRenderer();
00024 
00025     void resize(int w, int h);
00026     void draw(QPainter* pPainter, QPaintEvent *pEvent);
00027     void glDraw();
00028     void drawSignalLines();
00029     void drawSignalPixmap(QPainter* p);
00030     void newTrack(TrackPointer pTrack);
00031     void setup(QDomNode node);
00032     void precomputePixmap();
00033     void setDesiredSecondsToDisplay(int seconds);
00034     int getDesiredSecondsToDisplay();
00035 
00036 public slots:
00037     void slotUpdatePlayPos(double playpos);
00038 
00039 private:
00040     void setupControlObjects();
00041     bool fetchWaveformFromTrack();
00042     int m_iWidth, m_iHeight;
00043     QColor bgColor, signalColor, colorMarker, colorBeat, colorCue;
00044     int m_iNumSamples, m_iMax, m_iMin;
00045     double m_dPlayPos;
00046     QVector<float> *m_pSampleBuffer;
00047 
00048     ControlObjectThreadMain *m_pPlayPos;
00049     ControlObject *m_pCOVerticalScale;
00050     ControlObject *m_pCOVisualResample;
00051 
00052     int m_iDesiredSecondsToDisplay;
00053     TrackPointer m_pTrack;
00054 
00055     GLfloat *m_pInternalBuffer;
00056     int m_iInternalBufferSize;
00057 };
00058 
00059 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines