Diffstat (limited to 'noncore/multimedia/opieplayer2/audiowidget.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.h | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.h b/noncore/multimedia/opieplayer2/audiowidget.h index bcd941e..7cb1d79 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.h +++ b/noncore/multimedia/opieplayer2/audiowidget.h | |||
@@ -38,16 +38,17 @@ | |||
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 | #include <opie/oticker.h> | ||
46 | 47 | ||
47 | class QPixmap; | 48 | class QPixmap; |
48 | 49 | ||
49 | namespace { | 50 | namespace { |
50 | 51 | ||
51 | enum AudioButtons { | 52 | enum AudioButtons { |
52 | AudioPlay=0, | 53 | AudioPlay=0, |
53 | AudioStop, | 54 | AudioStop, |
@@ -57,33 +58,16 @@ enum AudioButtons { | |||
57 | AudioVolumeDown, | 58 | AudioVolumeDown, |
58 | AudioLoop, | 59 | AudioLoop, |
59 | AudioPlayList, | 60 | AudioPlayList, |
60 | AudioForward, | 61 | AudioForward, |
61 | AudioBack | 62 | AudioBack |
62 | }; | 63 | }; |
63 | }; | 64 | }; |
64 | 65 | ||
65 | class Ticker : public QFrame { | ||
66 | Q_OBJECT | ||
67 | |||
68 | public: | ||
69 | Ticker( QWidget* parent=0 ); | ||
70 | ~Ticker(); | ||
71 | void setText( const QString& text ) ; | ||
72 | |||
73 | protected: | ||
74 | void timerEvent( QTimerEvent * ); | ||
75 | void drawContents( QPainter *p ); | ||
76 | private: | ||
77 | QString scrollText; | ||
78 | int pos, pixelLen; | ||
79 | }; | ||
80 | |||
81 | |||
82 | class AudioWidget : public QWidget { | 66 | class AudioWidget : public QWidget { |
83 | Q_OBJECT | 67 | Q_OBJECT |
84 | public: | 68 | public: |
85 | AudioWidget( QWidget* parent=0, const char* name=0, WFlags f=0 ); | 69 | AudioWidget( QWidget* parent=0, const char* name=0, WFlags f=0 ); |
86 | ~AudioWidget(); | 70 | ~AudioWidget(); |
87 | void setTickerText( const QString &text ) { songInfo.setText( text ); } | 71 | void setTickerText( const QString &text ) { songInfo.setText( text ); } |
88 | public slots: | 72 | public slots: |
89 | void updateSlider( long, long ); | 73 | void updateSlider( long, long ); |
@@ -133,17 +117,17 @@ private: | |||
133 | QImage *imgUp; | 117 | QImage *imgUp; |
134 | QImage *imgDn; | 118 | QImage *imgDn; |
135 | QImage *imgButtonMask; | 119 | QImage *imgButtonMask; |
136 | QBitmap *masks[10]; | 120 | QBitmap *masks[10]; |
137 | QPixmap *buttonPixUp[10]; | 121 | QPixmap *buttonPixUp[10]; |
138 | QPixmap *buttonPixDown[10]; | 122 | QPixmap *buttonPixDown[10]; |
139 | 123 | ||
140 | QPixmap *pixmaps[4]; | 124 | QPixmap *pixmaps[4]; |
141 | Ticker songInfo; | 125 | OTicker songInfo; |
142 | QSlider slider; | 126 | QSlider slider; |
143 | QLineEdit time; | 127 | QLineEdit time; |
144 | int xoff, yoff; | 128 | int xoff, yoff; |
145 | bool isStreaming : 1; | 129 | bool isStreaming : 1; |
146 | }; | 130 | }; |
147 | 131 | ||
148 | 132 | ||
149 | #endif // AUDIO_WIDGET_H | 133 | #endif // AUDIO_WIDGET_H |