summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index 956789f..6f3842f 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -336,98 +336,102 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) {
336 case VideoStop: mediaPlayerState->setPlaying( FALSE ); return; 336 case VideoStop: mediaPlayerState->setPlaying( FALSE ); return;
337 case VideoNext: mediaPlayerState->setNext(); return; 337 case VideoNext: mediaPlayerState->setNext(); return;
338 case VideoPrevious: mediaPlayerState->setPrev(); return; 338 case VideoPrevious: mediaPlayerState->setPrev(); return;
339 case VideoVolUp: emit moreReleased(); return; 339 case VideoVolUp: emit moreReleased(); return;
340 case VideoVolDown: emit lessReleased(); return; 340 case VideoVolDown: emit lessReleased(); return;
341 case VideoFullscreen: mediaPlayerState->setFullscreen( TRUE ); makeVisible(); return; 341 case VideoFullscreen: mediaPlayerState->setFullscreen( TRUE ); makeVisible(); return;
342 } 342 }
343 } 343 }
344 } 344 }
345 } 345 }
346} 346}
347 347
348void VideoWidget::mousePressEvent( QMouseEvent *event ) { 348void VideoWidget::mousePressEvent( QMouseEvent *event ) {
349 mouseMoveEvent( event ); 349 mouseMoveEvent( event );
350} 350}
351 351
352void VideoWidget::mouseReleaseEvent( QMouseEvent *event ) { 352void VideoWidget::mouseReleaseEvent( QMouseEvent *event ) {
353 if ( mediaPlayerState->fullscreen() ) { 353 if ( mediaPlayerState->fullscreen() ) {
354 mediaPlayerState->setFullscreen( FALSE ); 354 mediaPlayerState->setFullscreen( FALSE );
355 makeVisible(); 355 makeVisible();
356 } 356 }
357 mouseMoveEvent( event ); 357 mouseMoveEvent( event );
358} 358}
359 359
360void VideoWidget::showEvent( QShowEvent* ) { 360void VideoWidget::showEvent( QShowEvent* ) {
361 QMouseEvent event( QEvent::MouseMove, QPoint( 0, 0 ), 0, 0 ); 361 QMouseEvent event( QEvent::MouseMove, QPoint( 0, 0 ), 0, 0 );
362 mouseMoveEvent( &event ); 362 mouseMoveEvent( &event );
363} 363}
364 364
365 365
366 void VideoWidget::backToNormal() { 366 void VideoWidget::backToNormal() {
367 mediaPlayerState->setFullscreen( FALSE ); 367 mediaPlayerState->setFullscreen( FALSE );
368 makeVisible(); 368 makeVisible();
369 } 369 }
370 370
371void VideoWidget::makeVisible() { 371void VideoWidget::makeVisible() {
372 if ( mediaPlayerState->fullscreen() ) { 372 if ( mediaPlayerState->fullscreen() ) {
373 setBackgroundMode( QWidget::NoBackground ); 373 setBackgroundMode( QWidget::NoBackground );
374 showFullScreen(); 374 showFullScreen();
375 resize( qApp->desktop()->size() ); 375 resize( qApp->desktop()->size() );
376 slider->hide(); 376 slider->hide();
377 videoFrame-> setGeometry ( 0, 0, width ( ), height ( )); 377 videoFrame-> setGeometry ( 0, 0, width ( ), height ( ));
378 378
379 } else { 379 } else {
380 showMaximized(); 380 showMaximized();
381 setBackgroundPixmap( *pixBg ); 381 setBackgroundPixmap( *pixBg );
382 if ( mediaPlayerState->streaming() ) { 382 if ( mediaPlayerState->streaming() ) {
383 slider->hide(); 383 slider->hide();
384 disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
385 disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
384 } else { 386 } else {
385 slider->show(); 387 slider->show();
388 connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
389 connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
386 } 390 }
387 videoFrame->setGeometry( QRect( 0, 30, 240, 170 ) ); 391 videoFrame->setGeometry( QRect( 0, 30, 240, 170 ) );
388 qApp->processEvents(); 392 qApp->processEvents();
389 } 393 }
390} 394}
391 395
392 396
393void VideoWidget::paintEvent( QPaintEvent * pe) { 397void VideoWidget::paintEvent( QPaintEvent * pe) {
394 QPainter p( this ); 398 QPainter p( this );
395 399
396 if ( mediaPlayerState->fullscreen() ) { 400 if ( mediaPlayerState->fullscreen() ) {
397 // Clear the background 401 // Clear the background
398 p.setBrush( QBrush( Qt::black ) ); 402 p.setBrush( QBrush( Qt::black ) );
399 } else { 403 } else {
400 if ( !pe->erased() ) { 404 if ( !pe->erased() ) {
401 // Combine with background and double buffer 405 // Combine with background and double buffer
402 QPixmap pix( pe->rect().size() ); 406 QPixmap pix( pe->rect().size() );
403 QPainter p( &pix ); 407 QPainter p( &pix );
404 p.translate( -pe->rect().topLeft().x(), -pe->rect().topLeft().y() ); 408 p.translate( -pe->rect().topLeft().x(), -pe->rect().topLeft().y() );
405 p.drawTiledPixmap( pe->rect(), *pixBg, pe->rect().topLeft() ); 409 p.drawTiledPixmap( pe->rect(), *pixBg, pe->rect().topLeft() );
406 for ( int i = 0; i < numVButtons; i++ ) { 410 for ( int i = 0; i < numVButtons; i++ ) {
407 paintButton( &p, i ); 411 paintButton( &p, i );
408 } 412 }
409 QPainter p2( this ); 413 QPainter p2( this );
410 p2.drawPixmap( pe->rect().topLeft(), pix ); 414 p2.drawPixmap( pe->rect().topLeft(), pix );
411 } else { 415 } else {
412 QPainter p( this ); 416 QPainter p( this );
413 for ( int i = 0; i < numVButtons; i++ ) 417 for ( int i = 0; i < numVButtons; i++ )
414 paintButton( &p, i ); 418 paintButton( &p, i );
415 } 419 }
416 slider->repaint( TRUE ); 420 slider->repaint( TRUE );
417 } 421 }
418} 422}
419 423
420 424
421void VideoWidget::closeEvent( QCloseEvent* ) { 425void VideoWidget::closeEvent( QCloseEvent* ) {
422 mediaPlayerState->setList(); 426 mediaPlayerState->setList();
423} 427}
424 428
425 429
426 430
427void VideoWidget::keyReleaseEvent( QKeyEvent *e) { 431void VideoWidget::keyReleaseEvent( QKeyEvent *e) {
428 switch ( e->key() ) { 432 switch ( e->key() ) {
429////////////////////////////// Zaurus keys 433////////////////////////////// Zaurus keys
430 case Key_Home: 434 case Key_Home:
431 break; 435 break;
432 case Key_F9: //activity 436 case Key_F9: //activity
433 break; 437 break;