summaryrefslogtreecommitdiff
Side-by-side diff
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
@@ -68,13 +68,13 @@ void MediaPlayer::play() {
mediaPlayerState->setPlaying( FALSE );
mediaPlayerState->setPlaying( TRUE );
}
void MediaPlayer::setPlaying( bool play ) {
if ( !play ) {
- //mediaPlayerState->setPaused( TRUE );
+ // mediaPlayerState->setPaused( FALSE );
return;
}
if ( mediaPlayerState->paused() ) {
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
@@ -81,13 +81,15 @@ static const int numVButtons = (sizeof(videoButtons)/sizeof(MediaButton));
VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) :
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");
skin = cfg.readEntry("Skin","default");
QString skinPath = "opieplayer2/skins/" + skin;
@@ -340,14 +342,13 @@ 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 );
+ return;
}
}
case VideoStop: mediaPlayerState->setPlaying( FALSE ); return;
case VideoNext: mediaPlayerState->setNext(); return;
case VideoPrevious: mediaPlayerState->setPrev(); return;
@@ -375,24 +376,30 @@ void VideoWidget::mouseReleaseEvent( QMouseEvent *event ) {
void VideoWidget::showEvent( QShowEvent* ) {
QMouseEvent event( QEvent::MouseMove, QPoint( 0, 0 ), 0, 0 );
mouseMoveEvent( &event );
}
+ void VideoWidget::backToNormal() {
+ mediaPlayerState->setFullscreen( FALSE );
+ makeVisible();
+ }
+
void VideoWidget::makeVisible() {
if ( mediaPlayerState->fullscreen() ) {
setBackgroundMode( QWidget::NoBackground );
showFullScreen();
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();
}
}
void VideoWidget::paintEvent( QPaintEvent * pe) {
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
@@ -63,12 +63,13 @@ public slots:
void updateSlider( long, long );
void sliderPressed( );
void sliderReleased( );
void setPlaying( bool b);
void setFullscreen( bool b );
void makeVisible();
+ void backToNormal();
void setPosition( long );
void setLength( long );
void setView( char );
signals:
void moreClicked();
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
@@ -246,23 +246,25 @@ void XineVideoWidget::resizeEvent ( QResizeEvent * )
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();
}
}
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
@@ -53,12 +53,13 @@ protected:
void resizeEvent ( QResizeEvent *r );
void mousePressEvent ( QMouseEvent *e );
void mouseReleaseEvent ( QMouseEvent *e );
signals:
+ void clicked();
void videoResized ( const QSize &s );
private:
QRect m_lastframe;
QRect m_thisframe;