Diffstat (limited to 'noncore/multimedia/opieplayer2/audiowidget.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.h b/noncore/multimedia/opieplayer2/audiowidget.h index 626004a..c544882 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.h +++ b/noncore/multimedia/opieplayer2/audiowidget.h | |||
@@ -25,61 +25,63 @@ | |||
25 | -. .:....=;==+<; You should have received a copy of the GNU | 25 | -. .:....=;==+<; You should have received a copy of the GNU |
26 | -_. . . )=. = Library General Public License along with | 26 | -_. . . )=. = Library General Public License along with |
27 | -- :-=` this library; see the file COPYING.LIB. | 27 | -- :-=` this library; see the file COPYING.LIB. |
28 | If not, write to the Free Software Foundation, | 28 | If not, write to the Free Software Foundation, |
29 | Inc., 59 Temple Place - Suite 330, | 29 | Inc., 59 Temple Place - Suite 330, |
30 | Boston, MA 02111-1307, USA. | 30 | Boston, MA 02111-1307, USA. |
31 | 31 | ||
32 | */ | 32 | */ |
33 | 33 | ||
34 | #ifndef AUDIO_WIDGET_H | 34 | #ifndef AUDIO_WIDGET_H |
35 | #define AUDIO_WIDGET_H | 35 | #define AUDIO_WIDGET_H |
36 | 36 | ||
37 | #include <qwidget.h> | 37 | #include <qwidget.h> |
38 | #include <qpainter.h> | 38 | #include <qpainter.h> |
39 | #include <qdrawutil.h> | 39 | #include <qdrawutil.h> |
40 | #include <qpixmap.h> | 40 | #include <qpixmap.h> |
41 | #include <qstring.h> | 41 | #include <qstring.h> |
42 | #include <qslider.h> | 42 | #include <qslider.h> |
43 | #include <qframe.h> | 43 | #include <qframe.h> |
44 | #include <qlineedit.h> | 44 | #include <qlineedit.h> |
45 | 45 | ||
46 | 46 | ||
47 | class QPixmap; | 47 | class QPixmap; |
48 | 48 | ||
49 | namespace { | ||
50 | |||
49 | enum AudioButtons { | 51 | enum AudioButtons { |
50 | AudioPlay=0, | 52 | AudioPlay=0, |
51 | AudioStop, | 53 | AudioStop, |
52 | AudioNext, | 54 | AudioNext, |
53 | AudioPrevious, | 55 | AudioPrevious, |
54 | AudioVolumeUp, | 56 | AudioVolumeUp, |
55 | AudioVolumeDown, | 57 | AudioVolumeDown, |
56 | AudioLoop, | 58 | AudioLoop, |
57 | AudioPlayList, | 59 | AudioPlayList, |
58 | AudioForward, | 60 | AudioForward, |
59 | AudioBack | 61 | AudioBack |
60 | }; | 62 | }; |
61 | 63 | }; | |
62 | 64 | ||
63 | class Ticker : public QFrame { | 65 | class Ticker : public QFrame { |
64 | Q_OBJECT | 66 | Q_OBJECT |
65 | 67 | ||
66 | public: | 68 | public: |
67 | Ticker( QWidget* parent=0 ); | 69 | Ticker( QWidget* parent=0 ); |
68 | ~Ticker(); | 70 | ~Ticker(); |
69 | void setText( const QString& text ) ; | 71 | void setText( const QString& text ) ; |
70 | 72 | ||
71 | protected: | 73 | protected: |
72 | void timerEvent( QTimerEvent * ); | 74 | void timerEvent( QTimerEvent * ); |
73 | void drawContents( QPainter *p ); | 75 | void drawContents( QPainter *p ); |
74 | private: | 76 | private: |
75 | QString scrollText; | 77 | QString scrollText; |
76 | int pos, pixelLen; | 78 | int pos, pixelLen; |
77 | }; | 79 | }; |
78 | 80 | ||
79 | 81 | ||
80 | class AudioWidget : public QWidget { | 82 | class AudioWidget : public QWidget { |
81 | Q_OBJECT | 83 | Q_OBJECT |
82 | public: | 84 | public: |
83 | AudioWidget( QWidget* parent=0, const char* name=0, WFlags f=0 ); | 85 | AudioWidget( QWidget* parent=0, const char* name=0, WFlags f=0 ); |
84 | ~AudioWidget(); | 86 | ~AudioWidget(); |
85 | void setTickerText( const QString &text ) { songInfo.setText( text ); } | 87 | void setTickerText( const QString &text ) { songInfo.setText( text ); } |
@@ -119,29 +121,30 @@ protected: | |||
119 | void keyReleaseEvent( QKeyEvent *e); | 121 | void keyReleaseEvent( QKeyEvent *e); |
120 | private slots: | 122 | private slots: |
121 | void skipFor(); | 123 | void skipFor(); |
122 | void skipBack(); | 124 | void skipBack(); |
123 | void stopSkip(); | 125 | void stopSkip(); |
124 | private: | 126 | private: |
125 | void toggleButton( int ); | 127 | void toggleButton( int ); |
126 | void setToggleButton( int, bool ); | 128 | void setToggleButton( int, bool ); |
127 | void paintButton( QPainter *p, int i ); | 129 | void paintButton( QPainter *p, int i ); |
128 | int skipDirection; | 130 | int skipDirection; |
129 | QString skin; | 131 | QString skin; |
130 | QPixmap *pixBg; | 132 | QPixmap *pixBg; |
131 | QImage *imgUp; | 133 | QImage *imgUp; |
132 | QImage *imgDn; | 134 | QImage *imgDn; |
133 | QImage *imgButtonMask; | 135 | QImage *imgButtonMask; |
134 | QBitmap *masks[10]; | 136 | QBitmap *masks[10]; |
135 | QPixmap *buttonPixUp[10]; | 137 | QPixmap *buttonPixUp[10]; |
136 | QPixmap *buttonPixDown[10]; | 138 | QPixmap *buttonPixDown[10]; |
137 | 139 | ||
138 | QPixmap *pixmaps[4]; | 140 | QPixmap *pixmaps[4]; |
139 | Ticker songInfo; | 141 | Ticker songInfo; |
140 | QSlider slider; | 142 | QSlider slider; |
141 | QLineEdit time; | 143 | QLineEdit time; |
142 | int xoff, yoff; | 144 | int xoff, yoff; |
145 | bool isStreaming : 1; | ||
143 | }; | 146 | }; |
144 | 147 | ||
145 | 148 | ||
146 | #endif // AUDIO_WIDGET_H | 149 | #endif // AUDIO_WIDGET_H |
147 | 150 | ||