summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-11-10 15:46:12 (UTC)
committer harlekin <harlekin>2002-11-10 15:46:12 (UTC)
commitee6938139a5f8f24da901ab5a41930a98af00d44 (patch) (side-by-side diff)
treedc9c2d23efc1e9fe600206d8c10d1c0c567208b6
parentb0b173498acde27957f8ed9297bb2ed2346eb700 (diff)
downloadopie-ee6938139a5f8f24da901ab5a41930a98af00d44.zip
opie-ee6938139a5f8f24da901ab5a41930a98af00d44.tar.gz
opie-ee6938139a5f8f24da901ab5a41930a98af00d44.tar.bz2
better seek slider code for videowidget too
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp9
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.h1
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp36
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.h1
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.cpp2
5 files changed, 30 insertions, 19 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp
index 00d516c..de91a59 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.cpp
+++ b/noncore/multimedia/opieplayer2/audiowidget.cpp
@@ -191,5 +191,2 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
- connect( &slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) );
- connect( &slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) );
-
connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) );
@@ -321,3 +318,3 @@ void AudioWidget::setSeekable( bool isSeekable ) {
- if ( isSeekable ) {
+ if ( !isSeekable ) {
qDebug("<<<<<<<<<<<<<<file is STREAMING>>>>>>>>>>>>>>>>>>>");
@@ -328,2 +325,4 @@ void AudioWidget::setSeekable( bool isSeekable ) {
disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
+ disconnect( &slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) );
+ disconnect( &slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) );
} else {
@@ -335,2 +334,4 @@ void AudioWidget::setSeekable( bool isSeekable ) {
connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
+ connect( &slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) );
+ connect( &slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) );
}
diff --git a/noncore/multimedia/opieplayer2/audiowidget.h b/noncore/multimedia/opieplayer2/audiowidget.h
index 09dc19b..bcd941e 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.h
+++ b/noncore/multimedia/opieplayer2/audiowidget.h
@@ -91,3 +91,2 @@ public slots:
void sliderReleased( );
-// void setPaused( bool b) { setToggleButton( AudioPause, b ); }
void setLooping( bool b) { setToggleButton( AudioLoop, b ); }
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index 7d71d09..a847605 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -140,4 +140,2 @@ QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) {
- connect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) );
- connect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) );
connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) );
@@ -145,2 +143,3 @@ QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) {
connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) );
+ connect( mediaPlayerState, SIGNAL( isSeekableToggled( bool ) ), this, SLOT( setSeekable( bool ) ) );
@@ -390,11 +389,2 @@ void VideoWidget::makeVisible() {
setBackgroundPixmap( *pixBg );
- if ( mediaPlayerState->seekable() ) {
- slider->hide();
- disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
- disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
- } else {
- slider->show();
- connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
- connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
- }
QWidget *d = QApplication::desktop();
@@ -406,6 +396,26 @@ void VideoWidget::makeVisible() {
videoFrame->setGeometry( QRect( newW, 4, 240, 170 ) );
- } else
+ } else {
videoFrame->setGeometry( QRect( 0, 30, 240, 170 ) );
+ }
+ }
+}
+
-// qApp->processEvents();
+void VideoWidget::setSeekable( bool isSeekable ) {
+
+ if ( !isSeekable || mediaPlayerState->fullscreen() ) {
+ qDebug("<<<<<<<<<<<<<<file is STREAMING>>>>>>>>>>>>>>>>>>>");
+ if( !slider->isHidden()) {
+ slider->hide();
+ }
+ disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
+ disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
+ disconnect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) );
+ disconnect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) );
+ } else {
+ slider->show();
+ connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
+ connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
+ connect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) );
+ connect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) );
}
diff --git a/noncore/multimedia/opieplayer2/videowidget.h b/noncore/multimedia/opieplayer2/videowidget.h
index 990fa5f..fd02805 100644
--- a/noncore/multimedia/opieplayer2/videowidget.h
+++ b/noncore/multimedia/opieplayer2/videowidget.h
@@ -71,2 +71,3 @@ public slots:
void setLength( long );
+ void setSeekable( bool );
void setView( char );
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp
index 65ac127..c46994a 100644
--- a/noncore/multimedia/opieplayer2/xinecontrol.cpp
+++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp
@@ -101,3 +101,3 @@ void XineControl::play( const QString& fileName ) {
// determine if slider is shown
- mediaPlayerState->setIsSeekable( !libXine->isSeekable() );
+ mediaPlayerState->setIsSeekable( libXine->isSeekable() );