Diffstat (limited to 'core/multimedia/opieplayer/audiowidget.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/audiowidget.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/core/multimedia/opieplayer/audiowidget.h b/core/multimedia/opieplayer/audiowidget.h index d1d72b6..4ffd167 100644 --- a/core/multimedia/opieplayer/audiowidget.h +++ b/core/multimedia/opieplayer/audiowidget.h | |||
@@ -50,24 +50,24 @@ enum AudioButtons { | |||
50 | 50 | ||
51 | 51 | ||
52 | class Ticker : public QFrame { | 52 | class Ticker : public QFrame { |
53 | Q_OBJECT | 53 | Q_OBJECT |
54 | public: | 54 | public: |
55 | Ticker( QWidget* parent=0 ) : QFrame( parent ) { | 55 | Ticker( QWidget* parent=0 ) : QFrame( parent ) { |
56 | setFrameStyle( WinPanel | Sunken ); | 56 | setFrameStyle( WinPanel | Sunken ); |
57 | setText( "No Song" ); | 57 | setText( "No Song" ); |
58 | } | 58 | } |
59 | ~Ticker() { } | 59 | ~Ticker() { } |
60 | void setText( const QString& text ) { | 60 | void setText( const QString& text ) { |
61 | pos = 0; // reset it everytime the text is changed | 61 | pos = 0; // reset it everytime the text is changed |
62 | scrollText = text; | 62 | scrollText = text; |
63 | pixelLen = fontMetrics().width( scrollText ); | 63 | pixelLen = fontMetrics().width( scrollText ); |
64 | killTimers(); | 64 | killTimers(); |
65 | if ( pixelLen > width() ) | 65 | if ( pixelLen > width() ) |
66 | startTimer( 50 ); | 66 | startTimer( 50 ); |
67 | update(); | 67 | update(); |
68 | } | 68 | } |
69 | protected: | 69 | protected: |
70 | void timerEvent( QTimerEvent * ) { | 70 | void timerEvent( QTimerEvent * ) { |
71 | pos = ( pos + 1 > pixelLen ) ? 0 : pos + 1; | 71 | pos = ( pos + 1 > pixelLen ) ? 0 : pos + 1; |
72 | #ifndef USE_DBLBUF | 72 | #ifndef USE_DBLBUF |
73 | scroll( -1, 0, contentsRect() ); | 73 | scroll( -1, 0, contentsRect() ); |
@@ -99,13 +99,13 @@ private: | |||
99 | class AudioWidget : public QWidget { | 99 | class AudioWidget : public QWidget { |
100 | Q_OBJECT | 100 | Q_OBJECT |
101 | public: | 101 | public: |
102 | AudioWidget( QWidget* parent=0, const char* name=0, WFlags f=0 ); | 102 | AudioWidget( QWidget* parent=0, const char* name=0, WFlags f=0 ); |
103 | ~AudioWidget(); | 103 | ~AudioWidget(); |
104 | void setTickerText( const QString &text ) { songInfo->setText( text ); } | 104 | void setTickerText( const QString &text ) { songInfo->setText( text ); } |
105 | 105 | bool isStreaming; | |
106 | public slots: | 106 | public slots: |
107 | void updateSlider( long, long ); | 107 | void updateSlider( long, long ); |
108 | void sliderPressed( ); | 108 | void sliderPressed( ); |
109 | void sliderReleased( ); | 109 | void sliderReleased( ); |
110 | void setPaused( bool b) { setToggleButton( AudioPause, b ); } | 110 | void setPaused( bool b) { setToggleButton( AudioPause, b ); } |
111 | void setLooping( bool b) { setToggleButton( AudioLoop, b ); } | 111 | void setLooping( bool b) { setToggleButton( AudioLoop, b ); } |