Diffstat (limited to 'noncore/multimedia/opieplayer2/audiowidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 74bc390..1600320 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp | |||
@@ -151,25 +151,25 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : | |||
151 | // cofg.setGroup("Appearance"); | 151 | // cofg.setGroup("Appearance"); |
152 | // QColor backgroundcolor = QColor( cofg.readEntry( "Background", "#E5E1D5" ) ); | 152 | // QColor backgroundcolor = QColor( cofg.readEntry( "Background", "#E5E1D5" ) ); |
153 | 153 | ||
154 | time.setFocusPolicy( QWidget::NoFocus ); | 154 | time.setFocusPolicy( QWidget::NoFocus ); |
155 | time.setAlignment( Qt::AlignCenter ); | 155 | time.setAlignment( Qt::AlignCenter ); |
156 | 156 | ||
157 | // time.setFrame(FALSE); | 157 | // time.setFrame(FALSE); |
158 | // changeTextColor( &time ); | 158 | // changeTextColor( &time ); |
159 | 159 | ||
160 | resizeEvent( NULL ); | 160 | resizeEvent( NULL ); |
161 | 161 | ||
162 | connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); | 162 | connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); |
163 | connect( mediaPlayerState, SIGNAL( mediaTypeChanged(MediaPlayerState::MediaType) ), this, SLOT( setMediaType(MediaPlayerState::MediaType) ) ); | 163 | connect( mediaPlayerState, SIGNAL( displayTypeChanged(MediaPlayerState::DisplayType) ), this, SLOT( setDisplayType(MediaPlayerState::DisplayType) ) ); |
164 | connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) ); | 164 | connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) ); |
165 | connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); | 165 | connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); |
166 | connect( mediaPlayerState, SIGNAL( isSeekableToggled( bool ) ), this, SLOT( setSeekable( bool ) ) ); | 166 | connect( mediaPlayerState, SIGNAL( isSeekableToggled( bool ) ), this, SLOT( setSeekable( bool ) ) ); |
167 | 167 | ||
168 | connect( this, SIGNAL( forwardClicked() ), this, SLOT( skipFor() ) ); | 168 | connect( this, SIGNAL( forwardClicked() ), this, SLOT( skipFor() ) ); |
169 | connect( this, SIGNAL( backClicked() ), this, SLOT( skipBack() ) ); | 169 | connect( this, SIGNAL( backClicked() ), this, SLOT( skipBack() ) ); |
170 | connect( this, SIGNAL( forwardReleased() ), this, SLOT( stopSkip() ) ); | 170 | connect( this, SIGNAL( forwardReleased() ), this, SLOT( stopSkip() ) ); |
171 | connect( this, SIGNAL( backReleased() ), this, SLOT( stopSkip() ) ); | 171 | connect( this, SIGNAL( backReleased() ), this, SLOT( stopSkip() ) ); |
172 | 172 | ||
173 | // Intialise state | 173 | // Intialise state |
174 | setLength( mediaPlayerState->length() ); | 174 | setLength( mediaPlayerState->length() ); |
175 | setPosition( mediaPlayerState->position() ); | 175 | setPosition( mediaPlayerState->position() ); |
@@ -255,33 +255,33 @@ void AudioWidget::sliderReleased() { | |||
255 | 255 | ||
256 | void AudioWidget::setPosition( long i ) { | 256 | void AudioWidget::setPosition( long i ) { |
257 | // qDebug("<<<<<<<<<<<<<<<<<<<<<<<<set position %d",i); | 257 | // qDebug("<<<<<<<<<<<<<<<<<<<<<<<<set position %d",i); |
258 | updateSlider( i, mediaPlayerState->length() ); | 258 | updateSlider( i, mediaPlayerState->length() ); |
259 | } | 259 | } |
260 | 260 | ||
261 | 261 | ||
262 | void AudioWidget::setLength( long max ) { | 262 | void AudioWidget::setLength( long max ) { |
263 | updateSlider( mediaPlayerState->position(), max ); | 263 | updateSlider( mediaPlayerState->position(), max ); |
264 | } | 264 | } |
265 | 265 | ||
266 | 266 | ||
267 | void AudioWidget::setMediaType( MediaPlayerState::MediaType mediaType ) { | 267 | void AudioWidget::setDisplayType( MediaPlayerState::DisplayType mediaType ) { |
268 | if ( mediaType == MediaPlayerState::Video ) { | 268 | if ( mediaType == MediaPlayerState::Audio ) { |
269 | killTimers(); | 269 | // startTimer( 150 ); |
270 | hide(); | 270 | showMaximized(); |
271 | return; | 271 | return; |
272 | } | 272 | } |
273 | 273 | ||
274 | // startTimer( 150 ); | 274 | killTimers(); |
275 | showMaximized(); | 275 | hide(); |
276 | } | 276 | } |
277 | 277 | ||
278 | 278 | ||
279 | void AudioWidget::setSeekable( bool isSeekable ) { | 279 | void AudioWidget::setSeekable( bool isSeekable ) { |
280 | 280 | ||
281 | if ( !isSeekable ) { | 281 | if ( !isSeekable ) { |
282 | qDebug("<<<<<<<<<<<<<<file is STREAMING>>>>>>>>>>>>>>>>>>>"); | 282 | qDebug("<<<<<<<<<<<<<<file is STREAMING>>>>>>>>>>>>>>>>>>>"); |
283 | if( !slider.isHidden()) { | 283 | if( !slider.isHidden()) { |
284 | slider.hide(); | 284 | slider.hide(); |
285 | } | 285 | } |
286 | disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); | 286 | disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); |
287 | disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); | 287 | disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); |