summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-08-15 20:51:11 (UTC)
committer harlekin <harlekin>2002-08-15 20:51:11 (UTC)
commitbe99f951c39d19a6e9923103434afdb293741d35 (patch) (side-by-side diff)
tree4fe4d6cc51eee0bbdd53c9b353624d104929f08b
parent157b5b1209b656960fc0b27fc077eb36a77b2c3f (diff)
downloadopie-be99f951c39d19a6e9923103434afdb293741d35.zip
opie-be99f951c39d19a6e9923103434afdb293741d35.tar.gz
opie-be99f951c39d19a6e9923103434afdb293741d35.tar.bz2
click in fullscreen leeds to going back to the normal videowidget now
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayer.cpp2
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp13
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.h1
-rw-r--r--noncore/multimedia/opieplayer2/xinevideowidget.cpp10
-rw-r--r--noncore/multimedia/opieplayer2/xinevideowidget.h1
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
@@ -71,7 +71,7 @@ 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
@@ -84,7 +84,9 @@ QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) {
setCaption( tr("OpiePlayer - Video") );
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");
cfg.setGroup("Options");
@@ -343,8 +345,7 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) {
mediaPlayerState->setPaused( TRUE );
return;
} else {
- // setToggleButton( i, TRUE );
- // mediaPlayerState->setPlaying( videoButtons[i].isDown );
+ return;
}
}
@@ -378,6 +379,11 @@ void VideoWidget::showEvent( QShowEvent* ) {
}
+ void VideoWidget::backToNormal() {
+ mediaPlayerState->setFullscreen( FALSE );
+ makeVisible();
+ }
+
void VideoWidget::makeVisible() {
if ( mediaPlayerState->fullscreen() ) {
setBackgroundMode( QWidget::NoBackground );
@@ -385,11 +391,12 @@ void VideoWidget::makeVisible() {
resize( qApp->desktop()->size() );
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
@@ -66,6 +66,7 @@ public slots:
void setPlaying( bool b);
void setFullscreen( bool b );
void makeVisible();
+ void backToNormal();
void setPosition( long );
void setLength( long );
void setView( char );
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
@@ -249,9 +249,10 @@ void XineVideoWidget::mousePressEvent ( QMouseEvent *me )
QWidget *p = parentWidget ( );
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();
}
}
@@ -260,9 +261,10 @@ void XineVideoWidget::mouseReleaseEvent ( QMouseEvent *me )
QWidget *p = parentWidget ( );
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
@@ -56,6 +56,7 @@ protected:
void mouseReleaseEvent ( QMouseEvent *e );
signals:
+ void clicked();
void videoResized ( const QSize &s );
private: