-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.cpp | 2 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 13 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.h | 1 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/xinevideowidget.cpp | 10 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/xinevideowidget.h | 1 |
5 files changed, 19 insertions, 8 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp index 93819f2..22afe19 100644 --- a/noncore/multimedia/opieplayer2/mediaplayer.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp @@ -72,5 +72,5 @@ void MediaPlayer::play() { void MediaPlayer::setPlaying( bool play ) { if ( !play ) { - //mediaPlayerState->setPaused( TRUE ); + // mediaPlayerState->setPaused( FALSE ); return; } diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index 238770b..c2080e6 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp @@ -85,5 +85,7 @@ QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) { videoFrame = new XineVideoWidget ( this, "Video frame" ); + connect ( videoFrame, SIGNAL( videoResized ( const QSize & )), this, SIGNAL( videoResized ( const QSize & ))); + connect ( videoFrame, SIGNAL( clicked () ), this, SLOT ( backToNormal() ) ); Config cfg("OpiePlayer"); @@ -344,6 +346,5 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) { return; } else { - // setToggleButton( i, TRUE ); - // mediaPlayerState->setPlaying( videoButtons[i].isDown ); + return; } } @@ -379,4 +380,9 @@ void VideoWidget::showEvent( QShowEvent* ) { + void VideoWidget::backToNormal() { + mediaPlayerState->setFullscreen( FALSE ); + makeVisible(); + } + void VideoWidget::makeVisible() { if ( mediaPlayerState->fullscreen() ) { @@ -386,9 +392,10 @@ void VideoWidget::makeVisible() { slider->hide(); videoFrame-> setGeometry ( 0, 0, width ( ), height ( )); + } else { showNormal(); showMaximized(); slider->show(); - videoFrame->setGeometry( QRect( 10, 20, 220, 160 ) ); + videoFrame->setGeometry( QRect( 0, 30, 240, 170 ) ); qApp->processEvents(); } diff --git a/noncore/multimedia/opieplayer2/videowidget.h b/noncore/multimedia/opieplayer2/videowidget.h index b35558b..990fa5f 100644 --- a/noncore/multimedia/opieplayer2/videowidget.h +++ b/noncore/multimedia/opieplayer2/videowidget.h @@ -67,4 +67,5 @@ public slots: void setFullscreen( bool b ); void makeVisible(); + void backToNormal(); void setPosition( long ); void setLength( long ); diff --git a/noncore/multimedia/opieplayer2/xinevideowidget.cpp b/noncore/multimedia/opieplayer2/xinevideowidget.cpp index d65006b..3e28e54 100644 --- a/noncore/multimedia/opieplayer2/xinevideowidget.cpp +++ b/noncore/multimedia/opieplayer2/xinevideowidget.cpp @@ -250,7 +250,8 @@ void XineVideoWidget::mousePressEvent ( QMouseEvent *me ) if ( p ) { - QMouseEvent pme ( QEvent::MouseButtonPress, mapToParent ( me-> pos ( )), me-> globalPos ( ), me-> button ( ), me-> state ( )); + // QMouseEvent pme ( QEvent::MouseButtonPress, mapToParent ( me-> pos ( )), me-> globalPos ( ), me-> button ( ), me-> state ( )); - QApplication::sendEvent ( p, &pme ); + // QApplication::sendEvent ( p, &pme ); + // emit clicked(); } } @@ -261,7 +262,8 @@ void XineVideoWidget::mouseReleaseEvent ( QMouseEvent *me ) if ( p ) { - QMouseEvent pme ( QEvent::MouseButtonRelease, mapToParent ( me-> pos ( )), me-> globalPos ( ), me-> button ( ), me-> state ( )); + // QMouseEvent pme ( QEvent::MouseButtonRelease, mapToParent ( me-> pos ( )), me-> globalPos ( ), me-> button ( ), me-> state ( )); - QApplication::sendEvent ( p, &pme ); + // QApplication::sendEvent ( p, &pme ); + emit clicked(); } } diff --git a/noncore/multimedia/opieplayer2/xinevideowidget.h b/noncore/multimedia/opieplayer2/xinevideowidget.h index 2fc627d..c5101da 100644 --- a/noncore/multimedia/opieplayer2/xinevideowidget.h +++ b/noncore/multimedia/opieplayer2/xinevideowidget.h @@ -57,4 +57,5 @@ protected: signals: + void clicked(); void videoResized ( const QSize &s ); |