Mixxx

/home/maxime/Projets/Mixxx/1.10/mixxx/src/widget/wknob.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           wknob.h  -  description
00003                              -------------------
00004     begin                : Fri Jun 21 2002
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 WKNOB_H
00019 #define WKNOB_H
00020 
00021 #include "wabstractcontrol.h"
00022 #include <qpixmap.h>
00023 #include <qstring.h>
00024 //Added by qt3to4:
00025 #include <QPaintEvent>
00026 #include <QMouseEvent>
00027 
00032 class WKnob : public WAbstractControl  {
00033    Q_OBJECT
00034 public:
00035     WKnob(QWidget *parent=0, float defaultValue=63.);
00036     ~WKnob();
00037     void setup(QDomNode node);
00038     void setPositions(int iNoPos, bool bIncludingDisabled=false);
00039     void setPixmap(int iPos, const QString &filename);
00042     void setPixmapBackground(const QString &filename);
00043     void wheelEvent(QWheelEvent *e);
00044 private:
00046     void resetPositions();
00047     void mouseMoveEvent(QMouseEvent *e);
00048     void mousePressEvent(QMouseEvent *e);
00049     void mouseReleaseEvent(QMouseEvent *e);
00050     void paintEvent(QPaintEvent *);
00051 
00053     int m_iPos;
00055     int m_iNoPos;
00057     QPixmap **m_pPixmaps;
00059     QPixmap *m_pPixmapBack;
00061     QPoint m_startPos;
00063     bool m_bDisabledLoaded;
00064 };
00065 
00066 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines