summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/audiowidget.h
Unidiff
Diffstat (limited to 'noncore/multimedia/opieplayer2/audiowidget.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.h51
1 files changed, 46 insertions, 5 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.h b/noncore/multimedia/opieplayer2/audiowidget.h
index 2b892be..e05188e 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.h
+++ b/noncore/multimedia/opieplayer2/audiowidget.h
@@ -1,6 +1,39 @@
1/*
2                This file is part of the Opie Project
3
4              Copyright (c) 2002 Max Reiss <harlekin@handhelds.org>
5 Copyright (c) 2002 L. Potter <ljp@llornkcor.com>
6 Copyright (c) 2002 Holger Freyther <zecke@handhelds.org>
7 =.
8 .=l.
9           .>+-=
10 _;:,     .>    :=|. This program is free software; you can
11.> <`_,   >  .   <= redistribute it and/or modify it under
12:`=1 )Y*s>-.--   : the terms of the GNU General Public
13.="- .-=="i,     .._ License as published by the Free Software
14 - .   .-<_>     .<> Foundation; either version 2 of the License,
15     ._= =}       : or (at your option) any later version.
16    .%`+i>       _;_.
17    .i_,=:_.      -<s. This program is distributed in the hope that
18     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
19    : ..    .:,     . . . without even the implied warranty of
20    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
22..}^=.=       =       ; Library General Public License for more
23++=   -.     .`     .: details.
24 :     =  ...= . :.=-
25 -.   .:....=;==+<; You should have received a copy of the GNU
26  -_. . .   )=.  = Library General Public License along with
27    --        :-=` this library; see the file COPYING.LIB.
28 If not, write to the Free Software Foundation,
29 Inc., 59 Temple Place - Suite 330,
30 Boston, MA 02111-1307, USA.
31
32*/
33
1#ifndef AUDIO_WIDGET_H 34#ifndef AUDIO_WIDGET_H
2#define AUDIO_WIDGET_H 35#define AUDIO_WIDGET_H
3 36
4#include <qwidget.h> 37#include <qwidget.h>
5#include <qpainter.h> 38#include <qpainter.h>
6#include <qdrawutil.h> 39#include <qdrawutil.h>
@@ -19,19 +52,18 @@ enum AudioButtons {
19 AudioPause, 52 AudioPause,
20 AudioNext, 53 AudioNext,
21 AudioPrevious, 54 AudioPrevious,
22 AudioVolumeUp, 55 AudioVolumeUp,
23 AudioVolumeDown, 56 AudioVolumeDown,
24 AudioLoop, 57 AudioLoop,
25 AudioPlayList 58 AudioPlayList,
59 AudioForward,
60 AudioBack
26}; 61};
27 62
28 63
29//#define USE_DBLBUF
30
31
32class Ticker : public QFrame { 64class Ticker : public QFrame {
33 Q_OBJECT 65 Q_OBJECT
34 66
35public: 67public:
36 Ticker( QWidget* parent=0 ); 68 Ticker( QWidget* parent=0 );
37 ~Ticker(); 69 ~Ticker();
@@ -66,12 +98,16 @@ public slots:
66 98
67signals: 99signals:
68 void moreClicked(); 100 void moreClicked();
69 void lessClicked(); 101 void lessClicked();
70 void moreReleased(); 102 void moreReleased();
71 void lessReleased(); 103 void lessReleased();
104 void forwardClicked();
105 void backClicked();
106 void forwardReleased();
107 void backReleased();
72 void sliderMoved(long); 108 void sliderMoved(long);
73 109
74protected: 110protected:
75 void doBlank(); 111 void doBlank();
76 void doUnblank(); 112 void doUnblank();
77 void paintEvent( QPaintEvent *pe ); 113 void paintEvent( QPaintEvent *pe );
@@ -80,25 +116,30 @@ protected:
80 void mouseMoveEvent( QMouseEvent *event ); 116 void mouseMoveEvent( QMouseEvent *event );
81 void mousePressEvent( QMouseEvent *event ); 117 void mousePressEvent( QMouseEvent *event );
82 void mouseReleaseEvent( QMouseEvent *event ); 118 void mouseReleaseEvent( QMouseEvent *event );
83 void timerEvent( QTimerEvent *event ); 119 void timerEvent( QTimerEvent *event );
84 void closeEvent( QCloseEvent *event ); 120 void closeEvent( QCloseEvent *event );
85 void keyReleaseEvent( QKeyEvent *e); 121 void keyReleaseEvent( QKeyEvent *e);
122private slots:
123 void skipFor();
124 void skipBack();
125 void stopSkip();
86private: 126private:
87 void toggleButton( int ); 127 void toggleButton( int );
88 void setToggleButton( int, bool ); 128 void setToggleButton( int, bool );
89 void paintButton( QPainter *p, int i ); 129 void paintButton( QPainter *p, int i );
130 int skipDirection;
90 QString skin; 131 QString skin;
91 QPixmap *pixBg; 132 QPixmap *pixBg;
92 QImage *imgUp; 133 QImage *imgUp;
93 QImage *imgDn; 134 QImage *imgDn;
94 QImage *imgButtonMask; 135 QImage *imgButtonMask;
95 QBitmap *masks[11]; 136 QBitmap *masks[11];
96 QPixmap *buttonPixUp[11]; 137 QPixmap *buttonPixUp[11];
97 QPixmap *buttonPixDown[11]; 138 QPixmap *buttonPixDown[11];
98 139
99 QPixmap *pixmaps[4]; 140 QPixmap *pixmaps[4];
100 Ticker songInfo; 141 Ticker songInfo;
101 QSlider slider; 142 QSlider slider;
102 QLineEdit time; 143 QLineEdit time;
103 int xoff, yoff; 144 int xoff, yoff;
104}; 145};