summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-08-15 16:43:50 (UTC)
committer harlekin <harlekin>2002-08-15 16:43:50 (UTC)
commit09b410db4f8f0104ada5f76d611b39e49e327670 (patch) (unidiff)
treecdeaf715c48fa93c8e370d85ffdbf5f794e6a815
parent71520dfe386a04f8bce5d6f5d9d86dcbeda000d2 (diff)
downloadopie-09b410db4f8f0104ada5f76d611b39e49e327670.zip
opie-09b410db4f8f0104ada5f76d611b39e49e327670.tar.gz
opie-09b410db4f8f0104ada5f76d611b39e49e327670.tar.bz2
update
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp17
1 files changed, 1 insertions, 16 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index f5780aa..5a23d84 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -131,13 +131,12 @@ QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) {
131 resizeEvent( NULL ); 131 resizeEvent( NULL );
132 132
133 connect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); 133 connect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) );
134 connect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); 134 connect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) );
135 connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); 135 connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) );
136 connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) ); 136 connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) );
137 connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( setPaused(bool) ) );
138 connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); 137 connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) );
139 138
140 setLength( mediaPlayerState->length() ); 139 setLength( mediaPlayerState->length() );
141 setPosition( mediaPlayerState->position() ); 140 setPosition( mediaPlayerState->position() );
142 setFullscreen( mediaPlayerState->fullscreen() ); 141 setFullscreen( mediaPlayerState->fullscreen() );
143 setPaused( mediaPlayerState->paused() ); 142 setPaused( mediaPlayerState->paused() );
@@ -351,13 +350,12 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) {
351 // setToggleButton( i, TRUE ); 350 // setToggleButton( i, TRUE );
352 // mediaPlayerState->setPlaying( videoButtons[i].isDown ); 351 // mediaPlayerState->setPlaying( videoButtons[i].isDown );
353 } 352 }
354 } 353 }
355 354
356 case VideoStop: mediaPlayerState->setPlaying( FALSE ); return; 355 case VideoStop: mediaPlayerState->setPlaying( FALSE ); return;
357// case VideoPause: mediaPlayerState->setPaused(videoButtons[i].isDown); return;
358 case VideoNext: mediaPlayerState->setNext(); return; 356 case VideoNext: mediaPlayerState->setNext(); return;
359 case VideoPrevious: mediaPlayerState->setPrev(); return; 357 case VideoPrevious: mediaPlayerState->setPrev(); return;
360 case VideoVolUp: emit moreReleased(); return; 358 case VideoVolUp: emit moreReleased(); return;
361 case VideoVolDown: emit lessReleased(); return; 359 case VideoVolDown: emit lessReleased(); return;
362 case VideoFullscreen: mediaPlayerState->setFullscreen( TRUE ); makeVisible(); return; 360 case VideoFullscreen: mediaPlayerState->setFullscreen( TRUE ); makeVisible(); return;
363 } 361 }
@@ -372,13 +370,13 @@ void VideoWidget::mousePressEvent( QMouseEvent *event ) {
372 370
373void VideoWidget::mouseReleaseEvent( QMouseEvent *event ) { 371void VideoWidget::mouseReleaseEvent( QMouseEvent *event ) {
374 if ( mediaPlayerState->fullscreen() ) { 372 if ( mediaPlayerState->fullscreen() ) {
375 mediaPlayerState->setFullscreen( FALSE ); 373 mediaPlayerState->setFullscreen( FALSE );
376 makeVisible(); 374 makeVisible();
377 } 375 }
378 mouseMoveEvent( event ); 376 mouseMoveEvent( event );
379} 377}
380 378
381void VideoWidget::showEvent( QShowEvent* ) { 379void VideoWidget::showEvent( QShowEvent* ) {
382 QMouseEvent event( QEvent::MouseMove, QPoint( 0, 0 ), 0, 0 ); 380 QMouseEvent event( QEvent::MouseMove, QPoint( 0, 0 ), 0, 0 );
383 mouseMoveEvent( &event ); 381 mouseMoveEvent( &event );
384} 382}
@@ -404,19 +402,13 @@ void VideoWidget::makeVisible() {
404void VideoWidget::paintEvent( QPaintEvent * pe) { 402void VideoWidget::paintEvent( QPaintEvent * pe) {
405 QPainter p( this ); 403 QPainter p( this );
406 404
407 if ( mediaPlayerState->fullscreen() ) { 405 if ( mediaPlayerState->fullscreen() ) {
408 // Clear the background 406 // Clear the background
409 p.setBrush( QBrush( Qt::black ) ); 407 p.setBrush( QBrush( Qt::black ) );
410 // videoFrame->setGeometry( QRect( 0, 0 , 240 ,320 ) );
411
412 } else { 408 } else {
413
414 // videoFrame->setGeometry( QRect( 0, 15 , 240 ,170 ) );
415 // draw the buttons
416
417 if ( !pe->erased() ) { 409 if ( !pe->erased() ) {
418 // Combine with background and double buffer 410 // Combine with background and double buffer
419 QPixmap pix( pe->rect().size() ); 411 QPixmap pix( pe->rect().size() );
420 QPainter p( &pix ); 412 QPainter p( &pix );
421 p.translate( -pe->rect().topLeft().x(), -pe->rect().topLeft().y() ); 413 p.translate( -pe->rect().topLeft().x(), -pe->rect().topLeft().y() );
422 p.drawTiledPixmap( pe->rect(), *pixBg, pe->rect().topLeft() ); 414 p.drawTiledPixmap( pe->rect(), *pixBg, pe->rect().topLeft() );
@@ -427,16 +419,12 @@ void VideoWidget::paintEvent( QPaintEvent * pe) {
427 p2.drawPixmap( pe->rect().topLeft(), pix ); 419 p2.drawPixmap( pe->rect().topLeft(), pix );
428 } else { 420 } else {
429 QPainter p( this ); 421 QPainter p( this );
430 for ( int i = 0; i < numVButtons; i++ ) 422 for ( int i = 0; i < numVButtons; i++ )
431 paintButton( &p, i ); 423 paintButton( &p, i );
432 } 424 }
433 // for ( int i = 0; i < numButtons; i++ ) {
434 // paintButton( &p, i );
435 // }
436 // draw the slider
437 slider->repaint( TRUE ); 425 slider->repaint( TRUE );
438 } 426 }
439} 427}
440 428
441 429
442void VideoWidget::closeEvent( QCloseEvent* ) { 430void VideoWidget::closeEvent( QCloseEvent* ) {
@@ -499,14 +487,11 @@ XineVideoWidget* VideoWidget::vidWidget() {
499 487
500 488
501void VideoWidget::setFullscreen ( bool b ) { 489void VideoWidget::setFullscreen ( bool b ) {
502 setToggleButton( VideoFullscreen, b ); 490 setToggleButton( VideoFullscreen, b );
503} 491}
504 492
505void VideoWidget::setPaused( bool b) {
506// setToggleButton( VideoPause, b );
507}
508 493
509void VideoWidget::setPlaying( bool b) { 494void VideoWidget::setPlaying( bool b) {
510 setToggleButton( VideoPlay, b ); 495 setToggleButton( VideoPlay, b );
511} 496}
512 497