author | harlekin <harlekin> | 2002-08-15 16:43:50 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-08-15 16:43:50 (UTC) |
commit | 09b410db4f8f0104ada5f76d611b39e49e327670 (patch) (side-by-side diff) | |
tree | cdeaf715c48fa93c8e370d85ffdbf5f794e6a815 /noncore/multimedia/opieplayer2/videowidget.cpp | |
parent | 71520dfe386a04f8bce5d6f5d9d86dcbeda000d2 (diff) | |
download | opie-09b410db4f8f0104ada5f76d611b39e49e327670.zip opie-09b410db4f8f0104ada5f76d611b39e49e327670.tar.gz opie-09b410db4f8f0104ada5f76d611b39e49e327670.tar.bz2 |
update
Diffstat (limited to 'noncore/multimedia/opieplayer2/videowidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 17 |
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 @@ -125,25 +125,24 @@ QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) { slider = new QSlider( Qt::Horizontal, this ); slider->setMinValue( 0 ); slider->setMaxValue( 1 ); slider->setBackgroundPixmap( Resource::loadPixmap( backgroundPix ) ); slider->setFocusPolicy( QWidget::NoFocus ); resizeEvent( NULL ); connect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); connect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) ); - connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( setPaused(bool) ) ); connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); setLength( mediaPlayerState->length() ); setPosition( mediaPlayerState->position() ); setFullscreen( mediaPlayerState->fullscreen() ); setPaused( mediaPlayerState->paused() ); setPlaying( mediaPlayerState->playing() ); } VideoWidget::~VideoWidget() { @@ -345,46 +344,45 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) { return; } else if( !mediaPlayerState->isPaused ) { setToggleButton( i, TRUE ); mediaPlayerState->setPaused( TRUE ); return; } else { // setToggleButton( i, TRUE ); // mediaPlayerState->setPlaying( videoButtons[i].isDown ); } } case VideoStop: mediaPlayerState->setPlaying( FALSE ); return; -// case VideoPause: mediaPlayerState->setPaused(videoButtons[i].isDown); return; case VideoNext: mediaPlayerState->setNext(); return; case VideoPrevious: mediaPlayerState->setPrev(); return; case VideoVolUp: emit moreReleased(); return; case VideoVolDown: emit lessReleased(); return; case VideoFullscreen: mediaPlayerState->setFullscreen( TRUE ); makeVisible(); return; } } } } } void VideoWidget::mousePressEvent( QMouseEvent *event ) { mouseMoveEvent( event ); } void VideoWidget::mouseReleaseEvent( QMouseEvent *event ) { if ( mediaPlayerState->fullscreen() ) { mediaPlayerState->setFullscreen( FALSE ); makeVisible(); } - mouseMoveEvent( event ); + mouseMoveEvent( event ); } void VideoWidget::showEvent( QShowEvent* ) { QMouseEvent event( QEvent::MouseMove, QPoint( 0, 0 ), 0, 0 ); mouseMoveEvent( &event ); } void VideoWidget::makeVisible() { if ( mediaPlayerState->fullscreen() ) { setBackgroundMode( QWidget::NoBackground ); showFullScreen(); @@ -398,51 +396,41 @@ void VideoWidget::makeVisible() { videoFrame->setGeometry( QRect( 10, 20, 220, 160 ) ); qApp->processEvents(); } } void VideoWidget::paintEvent( QPaintEvent * pe) { QPainter p( this ); if ( mediaPlayerState->fullscreen() ) { // Clear the background p.setBrush( QBrush( Qt::black ) ); - // videoFrame->setGeometry( QRect( 0, 0 , 240 ,320 ) ); - } else { - - // videoFrame->setGeometry( QRect( 0, 15 , 240 ,170 ) ); - // draw the buttons - if ( !pe->erased() ) { // Combine with background and double buffer QPixmap pix( pe->rect().size() ); QPainter p( &pix ); p.translate( -pe->rect().topLeft().x(), -pe->rect().topLeft().y() ); p.drawTiledPixmap( pe->rect(), *pixBg, pe->rect().topLeft() ); for ( int i = 0; i < numVButtons; i++ ) { paintButton( &p, i ); } QPainter p2( this ); p2.drawPixmap( pe->rect().topLeft(), pix ); } else { QPainter p( this ); for ( int i = 0; i < numVButtons; i++ ) paintButton( &p, i ); } - // for ( int i = 0; i < numButtons; i++ ) { - // paintButton( &p, i ); - // } - // draw the slider slider->repaint( TRUE ); } } void VideoWidget::closeEvent( QCloseEvent* ) { mediaPlayerState->setList(); } void VideoWidget::keyReleaseEvent( QKeyEvent *e) { @@ -493,20 +481,17 @@ void VideoWidget::keyReleaseEvent( QKeyEvent *e) { }; } XineVideoWidget* VideoWidget::vidWidget() { return videoFrame; } void VideoWidget::setFullscreen ( bool b ) { setToggleButton( VideoFullscreen, b ); } -void VideoWidget::setPaused( bool b) { -// setToggleButton( VideoPause, b ); -} void VideoWidget::setPlaying( bool b) { setToggleButton( VideoPlay, b ); } |