![]() |
Mixxx
|
00001 /*************************************************************************** 00002 wvisualsimple.h - description 00003 ------------------- 00004 begin : Thu Oct 9 2003 00005 copyright : (C) 2002 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 WVISUALSIMPLE_H 00019 #define WVISUALSIMPLE_H 00020 00021 #include "wwidget.h" 00022 #include <qpoint.h> 00023 #include <qrect.h> 00024 //Added by qt3to4: 00025 #include <QPaintEvent> 00026 #include <QMouseEvent> 00027 #include <QDropEvent> 00028 #include <QDragEnterEvent> 00029 00034 class WaveformRenderer; 00035 00036 class WVisualSimple : public WWidget 00037 { 00038 Q_OBJECT 00039 public: 00040 WVisualSimple(const char* group, QWidget *parent, WaveformRenderer* pWaveformRenderer); 00041 virtual ~WVisualSimple(); 00042 00043 void dragEnterEvent(QDragEnterEvent *event); 00044 void dropEvent(QDropEvent *event); 00045 void setup(QDomNode node); 00046 void mouseMoveEvent(QMouseEvent *e); 00047 void mousePressEvent(QMouseEvent *e); 00048 void mouseReleaseEvent(QMouseEvent *e); 00049 void paintEvent(QPaintEvent *); 00050 00051 signals: 00052 void trackDropped(QString filename, QString group); 00053 00054 public slots: 00055 void setValue(double) {}; 00056 void refresh(); 00057 00058 00059 protected: 00060 QString m_group; 00061 int m_iStartPosX, m_iValue; 00062 QPoint m_qMarkerPos1, m_qMarkerPos2, m_qMousePos; 00063 00065 QColor colorSignal, colorMarker; 00066 00067 WaveformRenderer *m_pWaveformRenderer; 00068 }; 00069 00070 #endif