Diffstat (limited to 'core/multimedia/opieplayer/audiowidget.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/audiowidget.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/core/multimedia/opieplayer/audiowidget.h b/core/multimedia/opieplayer/audiowidget.h index c686741..96bc55c 100644 --- a/core/multimedia/opieplayer/audiowidget.h +++ b/core/multimedia/opieplayer/audiowidget.h | |||
@@ -15,86 +15,91 @@ | |||
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #ifndef AUDIO_WIDGET_H | 21 | #ifndef AUDIO_WIDGET_H |
22 | #define AUDIO_WIDGET_H | 22 | #define AUDIO_WIDGET_H |
23 | 23 | ||
24 | #include <qwidget.h> | 24 | #include <qwidget.h> |
25 | #include <qpainter.h> | 25 | #include <qpainter.h> |
26 | #include <qdrawutil.h> | 26 | #include <qdrawutil.h> |
27 | #include <qpixmap.h> | 27 | #include <qpixmap.h> |
28 | #include <qbitmap.h> | 28 | #include <qbitmap.h> |
29 | #include <qstring.h> | 29 | #include <qstring.h> |
30 | #include <qslider.h> | 30 | #include <qslider.h> |
31 | #include <qlineedit.h> | 31 | #include <qlineedit.h> |
32 | #include <qframe.h> | 32 | #include <qframe.h> |
33 | 33 | ||
34 | #include <opie/oticker.h> | 34 | #include <opie/oticker.h> |
35 | 35 | ||
36 | class QPixmap; | 36 | class QPixmap; |
37 | 37 | ||
38 | enum AudioButtons { | 38 | enum AudioButtons { |
39 | AudioPlay, | 39 | AudioPlay=0, |
40 | AudioStop, | 40 | AudioStop, |
41 | AudioPause, | ||
42 | AudioNext, | 41 | AudioNext, |
43 | AudioPrevious, | 42 | AudioPrevious, |
44 | AudioVolumeUp, | 43 | AudioVolumeUp, |
45 | AudioVolumeDown, | 44 | AudioVolumeDown, |
46 | AudioLoop, | 45 | AudioLoop, |
47 | AudioPlayList | 46 | AudioPlayList, |
47 | AudioForward, | ||
48 | AudioBack | ||
48 | }; | 49 | }; |
49 | 50 | ||
50 | 51 | ||
51 | //#define USE_DBLBUF | 52 | //#define USE_DBLBUF |
52 | 53 | ||
53 | class AudioWidget : public QWidget { | 54 | class AudioWidget : public QWidget { |
54 | Q_OBJECT | 55 | Q_OBJECT |
55 | public: | 56 | public: |
56 | AudioWidget( QWidget* parent=0, const char* name=0, WFlags f=0 ); | 57 | AudioWidget( QWidget* parent=0, const char* name=0, WFlags f=0 ); |
57 | ~AudioWidget(); | 58 | ~AudioWidget(); |
58 | void setTickerText( const QString &text ) { songInfo.setText( text ); } | 59 | void setTickerText( const QString &text ) { songInfo.setText( text ); } |
59 | bool isStreaming; | 60 | bool isStreaming; |
60 | public slots: | 61 | public slots: |
61 | void updateSlider( long, long ); | 62 | void updateSlider( long, long ); |
62 | void sliderPressed( ); | 63 | void sliderPressed( ); |
63 | void sliderReleased( ); | 64 | void sliderReleased( ); |
64 | void setPaused( bool b) { setToggleButton( AudioPause, b ); } | 65 | // void setPaused( bool b) { setToggleButton( AudioPause, b ); } |
65 | void setLooping( bool b) { setToggleButton( AudioLoop, b ); } | 66 | void setLooping( bool b) { setToggleButton( AudioLoop, b ); } |
66 | void setPlaying( bool b) { setToggleButton( AudioPlay, b ); } | 67 | void setPlaying( bool b) { setToggleButton( AudioPlay, b ); } |
67 | void setPosition( long ); | 68 | void setPosition( long ); |
68 | void setLength( long ); | 69 | void setLength( long ); |
69 | void setView( char ); | 70 | void setView( char ); |
70 | 71 | ||
71 | signals: | 72 | signals: |
72 | void moreClicked(); | 73 | void moreClicked(); |
73 | void lessClicked(); | 74 | void lessClicked(); |
74 | void moreReleased(); | 75 | void moreReleased(); |
75 | void lessReleased(); | 76 | void lessReleased(); |
76 | void sliderMoved(long); | 77 | void sliderMoved(long); |
78 | void forwardClicked(); | ||
79 | void backClicked(); | ||
80 | void forwardReleased(); | ||
81 | void backReleased(); | ||
77 | 82 | ||
78 | protected: | 83 | protected: |
79 | void doBlank(); | 84 | void doBlank(); |
80 | void doUnblank(); | 85 | void doUnblank(); |
81 | void paintEvent( QPaintEvent *pe ); | 86 | void paintEvent( QPaintEvent *pe ); |
82 | void showEvent( QShowEvent *se ); | 87 | void showEvent( QShowEvent *se ); |
83 | void resizeEvent( QResizeEvent *re ); | 88 | void resizeEvent( QResizeEvent *re ); |
84 | void mouseMoveEvent( QMouseEvent *event ); | 89 | void mouseMoveEvent( QMouseEvent *event ); |
85 | void mousePressEvent( QMouseEvent *event ); | 90 | void mousePressEvent( QMouseEvent *event ); |
86 | void mouseReleaseEvent( QMouseEvent *event ); | 91 | void mouseReleaseEvent( QMouseEvent *event ); |
87 | void timerEvent( QTimerEvent *event ); | 92 | void timerEvent( QTimerEvent *event ); |
88 | void closeEvent( QCloseEvent *event ); | 93 | void closeEvent( QCloseEvent *event ); |
89 | void keyReleaseEvent( QKeyEvent *e); | 94 | void keyReleaseEvent( QKeyEvent *e); |
90 | private: | 95 | private: |
91 | void toggleButton( int ); | 96 | void toggleButton( int ); |
92 | void setToggleButton( int, bool ); | 97 | void setToggleButton( int, bool ); |
93 | void paintButton( QPainter *p, int i ); | 98 | void paintButton( QPainter *p, int i ); |
94 | QString skin; | 99 | QString skin; |
95 | QPixmap *pixBg; | 100 | QPixmap *pixBg; |
96 | QImage *imgUp; | 101 | QImage *imgUp; |
97 | QImage *imgDn; | 102 | QImage *imgDn; |
98 | QImage *imgButtonMask; | 103 | QImage *imgButtonMask; |
99 | QBitmap *masks[11]; | 104 | QBitmap *masks[11]; |
100 | QPixmap *buttonPixUp[11]; | 105 | QPixmap *buttonPixUp[11]; |