summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-08-15 20:51:11 (UTC)
committer harlekin <harlekin>2002-08-15 20:51:11 (UTC)
commitbe99f951c39d19a6e9923103434afdb293741d35 (patch) (unidiff)
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() {
71 71
72void MediaPlayer::setPlaying( bool play ) { 72void MediaPlayer::setPlaying( bool play ) {
73 if ( !play ) { 73 if ( !play ) {
74 //mediaPlayerState->setPaused( TRUE ); 74 // mediaPlayerState->setPaused( FALSE );
75 return; 75 return;
76 } 76 }
77 77
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 ) {
84 setCaption( tr("OpiePlayer - Video") ); 84 setCaption( tr("OpiePlayer - Video") );
85 85
86 videoFrame = new XineVideoWidget ( this, "Video frame" ); 86 videoFrame = new XineVideoWidget ( this, "Video frame" );
87
87 connect ( videoFrame, SIGNAL( videoResized ( const QSize & )), this, SIGNAL( videoResized ( const QSize & ))); 88 connect ( videoFrame, SIGNAL( videoResized ( const QSize & )), this, SIGNAL( videoResized ( const QSize & )));
89 connect ( videoFrame, SIGNAL( clicked () ), this, SLOT ( backToNormal() ) );
88 90
89 Config cfg("OpiePlayer"); 91 Config cfg("OpiePlayer");
90 cfg.setGroup("Options"); 92 cfg.setGroup("Options");
@@ -343,8 +345,7 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) {
343 mediaPlayerState->setPaused( TRUE ); 345 mediaPlayerState->setPaused( TRUE );
344 return; 346 return;
345 } else { 347 } else {
346 // setToggleButton( i, TRUE ); 348 return;
347 // mediaPlayerState->setPlaying( videoButtons[i].isDown );
348 } 349 }
349 } 350 }
350 351
@@ -378,6 +379,11 @@ void VideoWidget::showEvent( QShowEvent* ) {
378} 379}
379 380
380 381
382 void VideoWidget::backToNormal() {
383 mediaPlayerState->setFullscreen( FALSE );
384 makeVisible();
385 }
386
381void VideoWidget::makeVisible() { 387void VideoWidget::makeVisible() {
382 if ( mediaPlayerState->fullscreen() ) { 388 if ( mediaPlayerState->fullscreen() ) {
383 setBackgroundMode( QWidget::NoBackground ); 389 setBackgroundMode( QWidget::NoBackground );
@@ -385,11 +391,12 @@ void VideoWidget::makeVisible() {
385 resize( qApp->desktop()->size() ); 391 resize( qApp->desktop()->size() );
386 slider->hide(); 392 slider->hide();
387 videoFrame-> setGeometry ( 0, 0, width ( ), height ( )); 393 videoFrame-> setGeometry ( 0, 0, width ( ), height ( ));
394
388 } else { 395 } else {
389 showNormal(); 396 showNormal();
390 showMaximized(); 397 showMaximized();
391 slider->show(); 398 slider->show();
392 videoFrame->setGeometry( QRect( 10, 20, 220, 160 ) ); 399 videoFrame->setGeometry( QRect( 0, 30, 240, 170 ) );
393 qApp->processEvents(); 400 qApp->processEvents();
394 } 401 }
395} 402}
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:
66 void setPlaying( bool b); 66 void setPlaying( bool b);
67 void setFullscreen( bool b ); 67 void setFullscreen( bool b );
68 void makeVisible(); 68 void makeVisible();
69 void backToNormal();
69 void setPosition( long ); 70 void setPosition( long );
70 void setLength( long ); 71 void setLength( long );
71 void setView( char ); 72 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 )
249 QWidget *p = parentWidget ( ); 249 QWidget *p = parentWidget ( );
250 250
251 if ( p ) { 251 if ( p ) {
252 QMouseEvent pme ( QEvent::MouseButtonPress, mapToParent ( me-> pos ( )), me-> globalPos ( ), me-> button ( ), me-> state ( )); 252 // QMouseEvent pme ( QEvent::MouseButtonPress, mapToParent ( me-> pos ( )), me-> globalPos ( ), me-> button ( ), me-> state ( ));
253 253
254 QApplication::sendEvent ( p, &pme ); 254 // QApplication::sendEvent ( p, &pme );
255 // emit clicked();
255 } 256 }
256} 257}
257 258
@@ -260,9 +261,10 @@ void XineVideoWidget::mouseReleaseEvent ( QMouseEvent *me )
260 QWidget *p = parentWidget ( ); 261 QWidget *p = parentWidget ( );
261 262
262 if ( p ) { 263 if ( p ) {
263 QMouseEvent pme ( QEvent::MouseButtonRelease, mapToParent ( me-> pos ( )), me-> globalPos ( ), me-> button ( ), me-> state ( )); 264 // QMouseEvent pme ( QEvent::MouseButtonRelease, mapToParent ( me-> pos ( )), me-> globalPos ( ), me-> button ( ), me-> state ( ));
264 265
265 QApplication::sendEvent ( p, &pme ); 266 // QApplication::sendEvent ( p, &pme );
267 emit clicked();
266 } 268 }
267} 269}
268 270
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:
56 void mouseReleaseEvent ( QMouseEvent *e ); 56 void mouseReleaseEvent ( QMouseEvent *e );
57 57
58signals: 58signals:
59 void clicked();
59 void videoResized ( const QSize &s ); 60 void videoResized ( const QSize &s );
60 61
61private: 62private: