Diffstat (limited to 'core/multimedia/opieplayer/audiowidget.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/audiowidget.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/multimedia/opieplayer/audiowidget.h b/core/multimedia/opieplayer/audiowidget.h index 96bc55c..0a7cb26 100644 --- a/core/multimedia/opieplayer/audiowidget.h +++ b/core/multimedia/opieplayer/audiowidget.h | |||
@@ -1,118 +1,118 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
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 <opie2/oticker.h> |
35 | 35 | ||
36 | class QPixmap; | 36 | class QPixmap; |
37 | 37 | ||
38 | enum AudioButtons { | 38 | enum AudioButtons { |
39 | AudioPlay=0, | 39 | AudioPlay=0, |
40 | AudioStop, | 40 | AudioStop, |
41 | AudioNext, | 41 | AudioNext, |
42 | AudioPrevious, | 42 | AudioPrevious, |
43 | AudioVolumeUp, | 43 | AudioVolumeUp, |
44 | AudioVolumeDown, | 44 | AudioVolumeDown, |
45 | AudioLoop, | 45 | AudioLoop, |
46 | AudioPlayList, | 46 | AudioPlayList, |
47 | AudioForward, | 47 | AudioForward, |
48 | AudioBack | 48 | AudioBack |
49 | }; | 49 | }; |
50 | 50 | ||
51 | 51 | ||
52 | //#define USE_DBLBUF | 52 | //#define USE_DBLBUF |
53 | 53 | ||
54 | class AudioWidget : public QWidget { | 54 | class AudioWidget : public QWidget { |
55 | Q_OBJECT | 55 | Q_OBJECT |
56 | public: | 56 | public: |
57 | AudioWidget( QWidget* parent=0, const char* name=0, WFlags f=0 ); | 57 | AudioWidget( QWidget* parent=0, const char* name=0, WFlags f=0 ); |
58 | ~AudioWidget(); | 58 | ~AudioWidget(); |
59 | void setTickerText( const QString &text ) { songInfo.setText( text ); } | 59 | void setTickerText( const QString &text ) { songInfo.setText( text ); } |
60 | bool isStreaming; | 60 | bool isStreaming; |
61 | public slots: | 61 | public slots: |
62 | void updateSlider( long, long ); | 62 | void updateSlider( long, long ); |
63 | void sliderPressed( ); | 63 | void sliderPressed( ); |
64 | void sliderReleased( ); | 64 | void sliderReleased( ); |
65 | // void setPaused( bool b) { setToggleButton( AudioPause, b ); } | 65 | // void setPaused( bool b) { setToggleButton( AudioPause, b ); } |
66 | void setLooping( bool b) { setToggleButton( AudioLoop, b ); } | 66 | void setLooping( bool b) { setToggleButton( AudioLoop, b ); } |
67 | void setPlaying( bool b) { setToggleButton( AudioPlay, b ); } | 67 | void setPlaying( bool b) { setToggleButton( AudioPlay, b ); } |
68 | void setPosition( long ); | 68 | void setPosition( long ); |
69 | void setLength( long ); | 69 | void setLength( long ); |
70 | void setView( char ); | 70 | void setView( char ); |
71 | 71 | ||
72 | signals: | 72 | signals: |
73 | void moreClicked(); | 73 | void moreClicked(); |
74 | void lessClicked(); | 74 | void lessClicked(); |
75 | void moreReleased(); | 75 | void moreReleased(); |
76 | void lessReleased(); | 76 | void lessReleased(); |
77 | void sliderMoved(long); | 77 | void sliderMoved(long); |
78 | void forwardClicked(); | 78 | void forwardClicked(); |
79 | void backClicked(); | 79 | void backClicked(); |
80 | void forwardReleased(); | 80 | void forwardReleased(); |
81 | void backReleased(); | 81 | void backReleased(); |
82 | 82 | ||
83 | protected: | 83 | protected: |
84 | void doBlank(); | 84 | void doBlank(); |
85 | void doUnblank(); | 85 | void doUnblank(); |
86 | void paintEvent( QPaintEvent *pe ); | 86 | void paintEvent( QPaintEvent *pe ); |
87 | void showEvent( QShowEvent *se ); | 87 | void showEvent( QShowEvent *se ); |
88 | void resizeEvent( QResizeEvent *re ); | 88 | void resizeEvent( QResizeEvent *re ); |
89 | void mouseMoveEvent( QMouseEvent *event ); | 89 | void mouseMoveEvent( QMouseEvent *event ); |
90 | void mousePressEvent( QMouseEvent *event ); | 90 | void mousePressEvent( QMouseEvent *event ); |
91 | void mouseReleaseEvent( QMouseEvent *event ); | 91 | void mouseReleaseEvent( QMouseEvent *event ); |
92 | void timerEvent( QTimerEvent *event ); | 92 | void timerEvent( QTimerEvent *event ); |
93 | void closeEvent( QCloseEvent *event ); | 93 | void closeEvent( QCloseEvent *event ); |
94 | void keyReleaseEvent( QKeyEvent *e); | 94 | void keyReleaseEvent( QKeyEvent *e); |
95 | private: | 95 | private: |
96 | void toggleButton( int ); | 96 | void toggleButton( int ); |
97 | void setToggleButton( int, bool ); | 97 | void setToggleButton( int, bool ); |
98 | void paintButton( QPainter *p, int i ); | 98 | void paintButton( QPainter *p, int i ); |
99 | QString skin; | 99 | QString skin; |
100 | QPixmap *pixBg; | 100 | QPixmap *pixBg; |
101 | QImage *imgUp; | 101 | QImage *imgUp; |
102 | QImage *imgDn; | 102 | QImage *imgDn; |
103 | QImage *imgButtonMask; | 103 | QImage *imgButtonMask; |
104 | QBitmap *masks[11]; | 104 | QBitmap *masks[11]; |
105 | QPixmap *buttonPixUp[11]; | 105 | QPixmap *buttonPixUp[11]; |
106 | QPixmap *buttonPixDown[11]; | 106 | QPixmap *buttonPixDown[11]; |
107 | 107 | ||
108 | QPixmap *pixmaps[4]; | 108 | QPixmap *pixmaps[4]; |
109 | OTicker songInfo; | 109 | Opie::Ui::OTicker songInfo; |
110 | QSlider slider; | 110 | QSlider slider; |
111 | QLineEdit time; | 111 | QLineEdit time; |
112 | int xoff, yoff; | 112 | int xoff, yoff; |
113 | 113 | ||
114 | }; | 114 | }; |
115 | 115 | ||
116 | 116 | ||
117 | #endif // AUDIO_WIDGET_H | 117 | #endif // AUDIO_WIDGET_H |
118 | 118 | ||