author | harlekin <harlekin> | 2002-08-16 15:42:44 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-08-16 15:42:44 (UTC) |
commit | fec49e4f9f8d016e335eaca1630f4108801cc3ce (patch) (unidiff) | |
tree | 271c4dda3b4b634e0946528e4a4b2c9e6746d25c /noncore/multimedia | |
parent | aa9eba407a8236c72822d24643b58d4d48ae80c0 (diff) | |
download | opie-fec49e4f9f8d016e335eaca1630f4108801cc3ce.zip opie-fec49e4f9f8d016e335eaca1630f4108801cc3ce.tar.gz opie-fec49e4f9f8d016e335eaca1630f4108801cc3ce.tar.bz2 |
hide slider when streaming videos
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index 5a69bf5..956789f 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp | |||
@@ -231,27 +231,12 @@ void VideoWidget::setPosition( long i ) { | |||
231 | void VideoWidget::setLength( long max ) { | 231 | void VideoWidget::setLength( long max ) { |
232 | updateSlider( mediaPlayerState->position(), max ); | 232 | updateSlider( mediaPlayerState->position(), max ); |
233 | } | 233 | } |
234 | 234 | ||
235 | void VideoWidget::setView( char view ) { | 235 | void VideoWidget::setView( char view ) { |
236 | 236 | ||
237 | if ( mediaPlayerState->streaming() ) { | ||
238 | qDebug("<<<<<<<<<<<<<<file is STREAMING>>>>>>>>>>>>>>>>>>>"); | ||
239 | if( !slider->isHidden()) { | ||
240 | slider->hide(); | ||
241 | } | ||
242 | disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); | ||
243 | disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); | ||
244 | } else { | ||
245 | // this stops the slider from being moved, thus | ||
246 | // does not stop stream when it reaches the end | ||
247 | slider->show(); | ||
248 | connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); | ||
249 | connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); | ||
250 | } | ||
251 | |||
252 | if ( view == 'v' ) { | 237 | if ( view == 'v' ) { |
253 | makeVisible(); | 238 | makeVisible(); |
254 | } else { | 239 | } else { |
255 | // Effectively blank the view next time we show it so it looks nicer | 240 | // Effectively blank the view next time we show it so it looks nicer |
256 | scaledWidth = 0; | 241 | scaledWidth = 0; |
257 | scaledHeight = 0; | 242 | scaledHeight = 0; |
@@ -391,13 +376,17 @@ void VideoWidget::makeVisible() { | |||
391 | slider->hide(); | 376 | slider->hide(); |
392 | videoFrame-> setGeometry ( 0, 0, width ( ), height ( )); | 377 | videoFrame-> setGeometry ( 0, 0, width ( ), height ( )); |
393 | 378 | ||
394 | } else { | 379 | } else { |
395 | showMaximized(); | 380 | showMaximized(); |
396 | setBackgroundPixmap( *pixBg ); | 381 | setBackgroundPixmap( *pixBg ); |
397 | slider->show(); | 382 | if ( mediaPlayerState->streaming() ) { |
383 | slider->hide(); | ||
384 | } else { | ||
385 | slider->show(); | ||
386 | } | ||
398 | videoFrame->setGeometry( QRect( 0, 30, 240, 170 ) ); | 387 | videoFrame->setGeometry( QRect( 0, 30, 240, 170 ) ); |
399 | qApp->processEvents(); | 388 | qApp->processEvents(); |
400 | } | 389 | } |
401 | } | 390 | } |
402 | 391 | ||
403 | 392 | ||
@@ -482,13 +471,13 @@ void VideoWidget::keyReleaseEvent( QKeyEvent *e) { | |||
482 | if( mediaPlayerState->isPaused ) { | 471 | if( mediaPlayerState->isPaused ) { |
483 | setToggleButton( i, FALSE ); | 472 | setToggleButton( i, FALSE ); |
484 | mediaPlayerState->setPaused( FALSE ); | 473 | mediaPlayerState->setPaused( FALSE ); |
485 | } else if( !mediaPlayerState->isPaused ) { | 474 | } else if( !mediaPlayerState->isPaused ) { |
486 | setToggleButton( i, TRUE ); | 475 | setToggleButton( i, TRUE ); |
487 | mediaPlayerState->setPaused( TRUE ); | 476 | mediaPlayerState->setPaused( TRUE ); |
488 | } | 477 | } |
489 | #endif | 478 | #endif |
490 | break; | 479 | break; |
491 | 480 | ||
492 | }; | 481 | }; |
493 | } | 482 | } |
494 | 483 | ||