summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/audiowidget.cpp
Unidiff
Diffstat (limited to 'core/multimedia/opieplayer/audiowidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/multimedia/opieplayer/audiowidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/multimedia/opieplayer/audiowidget.cpp b/core/multimedia/opieplayer/audiowidget.cpp
index 44fbe48..fbc5072 100644
--- a/core/multimedia/opieplayer/audiowidget.cpp
+++ b/core/multimedia/opieplayer/audiowidget.cpp
@@ -265,49 +265,49 @@ void AudioWidget::setPosition( long i ) {
265 265
266 266
267void AudioWidget::setLength( long max ) { 267void AudioWidget::setLength( long max ) {
268 updateSlider( mediaPlayerState->position(), max ); 268 updateSlider( mediaPlayerState->position(), max );
269} 269}
270 270
271 271
272void AudioWidget::setView( char view ) { 272void AudioWidget::setView( char view ) {
273 273
274 if (mediaPlayerState->isStreaming) { 274 if (mediaPlayerState->isStreaming) {
275 if( !slider.isHidden()) slider.hide(); 275 if( !slider.isHidden()) slider.hide();
276 disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); 276 disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
277 disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); 277 disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
278 } else { 278 } else {
279// this stops the slider from being moved, thus 279// this stops the slider from being moved, thus
280 // does not stop stream when it reaches the end 280 // does not stop stream when it reaches the end
281 slider.show(); 281 slider.show();
282 connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); 282 connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
283 connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); 283 connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
284 } 284 }
285 285
286 if ( view == 'a' ) { 286 if ( view == 'a' ) {
287 startTimer( 150 ); 287 startTimer( 150 );
288// show(); 288// show();
289 showMaximized(); 289 QPEApplication::showWidget( this );
290 } else { 290 } else {
291 killTimers(); 291 killTimers();
292 hide(); 292 hide();
293 } 293 }
294 294
295} 295}
296 296
297 297
298static QString timeAsString( long length ) { 298static QString timeAsString( long length ) {
299 length /= 44100; 299 length /= 44100;
300 int minutes = length / 60; 300 int minutes = length / 60;
301 int seconds = length % 60; 301 int seconds = length % 60;
302 return QString("%1:%2%3").arg( minutes ).arg( seconds / 10 ).arg( seconds % 10 ); 302 return QString("%1:%2%3").arg( minutes ).arg( seconds / 10 ).arg( seconds % 10 );
303} 303}
304 304
305void AudioWidget::updateSlider( long i, long max ) { 305void AudioWidget::updateSlider( long i, long max ) {
306this->setFocus(); 306this->setFocus();
307 time.setText( timeAsString( i ) + " / " + timeAsString( max ) ); 307 time.setText( timeAsString( i ) + " / " + timeAsString( max ) );
308 308
309 if ( max == 0 ) 309 if ( max == 0 )
310 return; 310 return;
311 // Will flicker too much if we don't do this 311 // Will flicker too much if we don't do this
312 // Scale to something reasonable 312 // Scale to something reasonable
313 int width = slider.width(); 313 int width = slider.width();