author | harlekin <harlekin> | 2002-08-16 16:54:31 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-08-16 16:54:31 (UTC) |
commit | bc53cd5b0218ca10b6e88bb03a558230b7781cf7 (patch) (unidiff) | |
tree | 8a089ca404f55f0e16bb81de3b98ce51f1c10496 | |
parent | fec49e4f9f8d016e335eaca1630f4108801cc3ce (diff) | |
download | opie-bc53cd5b0218ca10b6e88bb03a558230b7781cf7.zip opie-bc53cd5b0218ca10b6e88bb03a558230b7781cf7.tar.gz opie-bc53cd5b0218ca10b6e88bb03a558230b7781cf7.tar.bz2 |
forgot something
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 4 |
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 | |||
@@ -352,66 +352,70 @@ void VideoWidget::mousePressEvent( QMouseEvent *event ) { | |||
352 | void VideoWidget::mouseReleaseEvent( QMouseEvent *event ) { | 352 | void 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 | ||
360 | void VideoWidget::showEvent( QShowEvent* ) { | 360 | void 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 | ||
371 | void VideoWidget::makeVisible() { | 371 | void 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 | ||
393 | void VideoWidget::paintEvent( QPaintEvent * pe) { | 397 | void 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 | } |