summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/videowidget.cpp
Unidiff
Diffstat (limited to 'noncore/multimedia/opieplayer2/videowidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index 6f3842f..ddb4d74 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -356,48 +356,49 @@ void VideoWidget::mouseReleaseEvent( QMouseEvent *event ) {
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 showNormal();
380 showMaximized(); 381 showMaximized();
381 setBackgroundPixmap( *pixBg ); 382 setBackgroundPixmap( *pixBg );
382 if ( mediaPlayerState->streaming() ) { 383 if ( mediaPlayerState->streaming() ) {
383 slider->hide(); 384 slider->hide();
384 disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); 385 disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
385 disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); 386 disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
386 } else { 387 } else {
387 slider->show(); 388 slider->show();
388 connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); 389 connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
389 connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); 390 connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
390 } 391 }
391 videoFrame->setGeometry( QRect( 0, 30, 240, 170 ) ); 392 videoFrame->setGeometry( QRect( 0, 30, 240, 170 ) );
392 qApp->processEvents(); 393 qApp->processEvents();
393 } 394 }
394} 395}
395 396
396 397
397void VideoWidget::paintEvent( QPaintEvent * pe) { 398void VideoWidget::paintEvent( QPaintEvent * pe) {
398 QPainter p( this ); 399 QPainter p( this );
399 400
400 if ( mediaPlayerState->fullscreen() ) { 401 if ( mediaPlayerState->fullscreen() ) {
401 // Clear the background 402 // Clear the background
402 p.setBrush( QBrush( Qt::black ) ); 403 p.setBrush( QBrush( Qt::black ) );
403 } else { 404 } else {