-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 13 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 9 |
2 files changed, 21 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 132a911..442864f 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp | |||
@@ -312,32 +312,33 @@ void AudioWidget::setView( char view ) { | |||
312 | disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); | 312 | disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); |
313 | } else { | 313 | } else { |
314 | // this stops the slider from being moved, thus | 314 | // this stops the slider from being moved, thus |
315 | // does not stop stream when it reaches the end | 315 | // does not stop stream when it reaches the end |
316 | slider.show(); | 316 | slider.show(); |
317 | connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); | 317 | connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); |
318 | connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); | 318 | connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); |
319 | } | 319 | } |
320 | 320 | ||
321 | if ( view == 'a' ) { | 321 | if ( view == 'a' ) { |
322 | // startTimer( 150 ); | 322 | // startTimer( 150 ); |
323 | showMaximized(); | 323 | showMaximized(); |
324 | } else { | 324 | } else { |
325 | killTimers(); | 325 | killTimers(); |
326 | hide(); | 326 | hide(); |
327 | } | 327 | } |
328 | qApp->processEvents(); | ||
328 | } | 329 | } |
329 | 330 | ||
330 | 331 | ||
331 | static QString timeAsString( long length ) { | 332 | static QString timeAsString( long length ) { |
332 | int minutes = length / 60; | 333 | int minutes = length / 60; |
333 | int seconds = length % 60; | 334 | int seconds = length % 60; |
334 | return QString("%1:%2%3").arg( minutes ).arg( seconds / 10 ).arg( seconds % 10 ); | 335 | return QString("%1:%2%3").arg( minutes ).arg( seconds / 10 ).arg( seconds % 10 ); |
335 | } | 336 | } |
336 | 337 | ||
337 | void AudioWidget::updateSlider( long i, long max ) { | 338 | void AudioWidget::updateSlider( long i, long max ) { |
338 | 339 | ||
339 | time.setText( timeAsString( i ) + " / " + timeAsString( max ) ); | 340 | time.setText( timeAsString( i ) + " / " + timeAsString( max ) ); |
340 | // qDebug( timeAsString( i ) + " / " + timeAsString( max ) ) ; | 341 | // qDebug( timeAsString( i ) + " / " + timeAsString( max ) ) ; |
341 | 342 | ||
342 | if ( max == 0 ) { | 343 | if ( max == 0 ) { |
343 | return; | 344 | return; |
@@ -557,21 +558,31 @@ void AudioWidget::keyReleaseEvent( QKeyEvent *e) | |||
557 | case Key_Up: | 558 | case Key_Up: |
558 | // toggleButton(5); | 559 | // toggleButton(5); |
559 | emit moreClicked(); | 560 | emit moreClicked(); |
560 | emit moreReleased(); | 561 | emit moreReleased(); |
561 | // toggleButton(5); | 562 | // toggleButton(5); |
562 | break; | 563 | break; |
563 | case Key_Right: | 564 | case Key_Right: |
564 | // toggleButton(3); | 565 | // toggleButton(3); |
565 | mediaPlayerState->setNext(); | 566 | mediaPlayerState->setNext(); |
566 | // toggleButton(3); | 567 | // toggleButton(3); |
567 | break; | 568 | break; |
568 | case Key_Left: | 569 | case Key_Left: |
569 | // toggleButton(4); | 570 | // toggleButton(4); |
570 | mediaPlayerState->setPrev(); | 571 | mediaPlayerState->setPrev(); |
571 | // toggleButton(4); | 572 | // toggleButton(4); |
572 | break; | 573 | break; |
573 | case Key_Escape: | 574 | case Key_Escape: { |
575 | #if defined(QT_QWS_IPAQ) | ||
576 | if( mediaPlayerState->isPaused ) { | ||
577 | setToggleButton( i, FALSE ); | ||
578 | mediaPlayerState->setPaused( FALSE ); | ||
579 | } else if( !mediaPlayerState->isPaused ) { | ||
580 | setToggleButton( i, TRUE ); | ||
581 | mediaPlayerState->setPaused( TRUE ); | ||
582 | } | ||
583 | #endif | ||
584 | } | ||
574 | break; | 585 | break; |
575 | 586 | ||
576 | }; | 587 | }; |
577 | } | 588 | } |
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index 0521419..5a69bf5 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp | |||
@@ -465,32 +465,41 @@ void VideoWidget::keyReleaseEvent( QKeyEvent *e) { | |||
465 | emit lessReleased(); | 465 | emit lessReleased(); |
466 | // toggleButton(6); | 466 | // toggleButton(6); |
467 | break; | 467 | break; |
468 | case Key_Up: | 468 | case Key_Up: |
469 | // toggleButton(5); | 469 | // toggleButton(5); |
470 | emit moreClicked(); | 470 | emit moreClicked(); |
471 | emit moreReleased(); | 471 | emit moreReleased(); |
472 | // toggleButton(5); | 472 | // toggleButton(5); |
473 | break; | 473 | break; |
474 | case Key_Right: | 474 | case Key_Right: |
475 | mediaPlayerState->setNext(); | 475 | mediaPlayerState->setNext(); |
476 | break; | 476 | break; |
477 | case Key_Left: | 477 | case Key_Left: |
478 | mediaPlayerState->setPrev(); | 478 | mediaPlayerState->setPrev(); |
479 | break; | 479 | break; |
480 | case Key_Escape: | 480 | case Key_Escape: |
481 | #if defined(QT_QWS_IPAQ) | ||
482 | if( mediaPlayerState->isPaused ) { | ||
483 | setToggleButton( i, FALSE ); | ||
484 | mediaPlayerState->setPaused( FALSE ); | ||
485 | } else if( !mediaPlayerState->isPaused ) { | ||
486 | setToggleButton( i, TRUE ); | ||
487 | mediaPlayerState->setPaused( TRUE ); | ||
488 | } | ||
489 | #endif | ||
481 | break; | 490 | break; |
482 | 491 | ||
483 | }; | 492 | }; |
484 | } | 493 | } |
485 | 494 | ||
486 | XineVideoWidget* VideoWidget::vidWidget() { | 495 | XineVideoWidget* VideoWidget::vidWidget() { |
487 | return videoFrame; | 496 | return videoFrame; |
488 | } | 497 | } |
489 | 498 | ||
490 | 499 | ||
491 | void VideoWidget::setFullscreen ( bool b ) { | 500 | void VideoWidget::setFullscreen ( bool b ) { |
492 | setToggleButton( VideoFullscreen, b ); | 501 | setToggleButton( VideoFullscreen, b ); |
493 | } | 502 | } |
494 | 503 | ||
495 | 504 | ||
496 | void VideoWidget::setPlaying( bool b) { | 505 | void VideoWidget::setPlaying( bool b) { |