Mixxx

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

Go to the documentation of this file.
00001 
00002 #ifndef WAVEFORMRENDERBEAT_H
00003 #define WAVEFORMRENDERBEAT_H
00004 
00005 #include <QObject>
00006 #include <QColor>
00007 #include <QVector>
00008 
00009 #include "renderobject.h"
00010 
00011 class QDomNode;
00012 class QPainter;
00013 class QPaintEvent;
00014 
00015 class ControlObjectThreadMain;
00016 class WaveformRenderer;
00017 class SoundSourceProxy;
00018 
00019 class WaveformRenderBeat : public RenderObject {
00020     Q_OBJECT
00021   public:
00022     WaveformRenderBeat(const char *group, WaveformRenderer *parent);
00023     virtual ~WaveformRenderBeat();
00024 
00025     void resize(int w, int h);
00026     void setup(QDomNode node);
00027     void draw(QPainter *pPainter, QPaintEvent *event, QVector<float> *buffer,
00028               double playPos, double rateAdjust);
00029     void newTrack(TrackPointer pTrack);
00030 
00031   private slots:
00032     void slotUpdateTrackSamples(double samples);
00033     void slotUpdateBeatActive(double beatActive);
00034     void slotUpdateTrackSampleRate(double sampleRate);
00035 
00036   private:
00037     WaveformRenderer *m_pParent;
00038     ControlObjectThreadMain* m_pTrackSamples;
00039     ControlObjectThreadMain *m_pTrackSampleRate;
00040     ControlObjectThreadMain* m_pBeatActive;
00041     TrackPointer m_pTrack;
00042     int m_iWidth, m_iHeight;
00043     QColor colorMarks;
00044     QColor colorHighlight;
00045     double m_dSamplesPerPixel;
00046     double m_dSamplesPerDownsample;
00047     int m_iNumSamples;
00048     int m_iSampleRate;
00049     bool m_bBeatActive;
00050     BeatList m_beatList;
00051 };
00052 
00053 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines