-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 9 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.h | 1 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 36 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.h | 1 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.cpp | 2 |
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 | |||
@@ -190,7 +190,4 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : | |||
190 | resizeEvent( NULL ); | 190 | resizeEvent( NULL ); |
191 | 191 | ||
192 | connect( &slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); | ||
193 | connect( &slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); | ||
194 | |||
195 | connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); | 192 | connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); |
196 | connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) ); | 193 | connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) ); |
@@ -320,5 +317,5 @@ if ( view == 'a' ) { | |||
320 | void AudioWidget::setSeekable( bool isSeekable ) { | 317 | void AudioWidget::setSeekable( bool isSeekable ) { |
321 | 318 | ||
322 | if ( isSeekable ) { | 319 | if ( !isSeekable ) { |
323 | qDebug("<<<<<<<<<<<<<<file is STREAMING>>>>>>>>>>>>>>>>>>>"); | 320 | qDebug("<<<<<<<<<<<<<<file is STREAMING>>>>>>>>>>>>>>>>>>>"); |
324 | if( !slider.isHidden()) { | 321 | if( !slider.isHidden()) { |
@@ -327,4 +324,6 @@ void AudioWidget::setSeekable( bool isSeekable ) { | |||
327 | disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); | 324 | disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); |
328 | disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); | 325 | disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); |
326 | disconnect( &slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); | ||
327 | disconnect( &slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); | ||
329 | } else { | 328 | } else { |
330 | // this stops the slider from being moved, thus | 329 | // this stops the slider from being moved, thus |
@@ -334,4 +333,6 @@ void AudioWidget::setSeekable( bool isSeekable ) { | |||
334 | connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); | 333 | connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); |
335 | connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); | 334 | connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); |
335 | connect( &slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); | ||
336 | connect( &slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); | ||
336 | } | 337 | } |
337 | } | 338 | } |
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 | |||
@@ -90,5 +90,4 @@ public slots: | |||
90 | void sliderPressed( ); | 90 | void sliderPressed( ); |
91 | void sliderReleased( ); | 91 | void sliderReleased( ); |
92 | // void setPaused( bool b) { setToggleButton( AudioPause, b ); } | ||
93 | void setLooping( bool b) { setToggleButton( AudioLoop, b ); } | 92 | void setLooping( bool b) { setToggleButton( AudioLoop, b ); } |
94 | void setPlaying( bool b) { setToggleButton( AudioPlay, b ); } | 93 | void setPlaying( bool b) { setToggleButton( AudioPlay, 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 | |||
@@ -139,9 +139,8 @@ QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) { | |||
139 | resizeEvent( NULL ); | 139 | resizeEvent( NULL ); |
140 | 140 | ||
141 | connect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); | ||
142 | connect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); | ||
143 | connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); | 141 | connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); |
144 | connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) ); | 142 | connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) ); |
145 | connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); | 143 | connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); |
144 | connect( mediaPlayerState, SIGNAL( isSeekableToggled( bool ) ), this, SLOT( setSeekable( bool ) ) ); | ||
146 | 145 | ||
147 | setLength( mediaPlayerState->length() ); | 146 | setLength( mediaPlayerState->length() ); |
@@ -389,13 +388,4 @@ void VideoWidget::makeVisible() { | |||
389 | showMaximized(); | 388 | showMaximized(); |
390 | setBackgroundPixmap( *pixBg ); | 389 | setBackgroundPixmap( *pixBg ); |
391 | if ( mediaPlayerState->seekable() ) { | ||
392 | slider->hide(); | ||
393 | disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); | ||
394 | disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); | ||
395 | } else { | ||
396 | slider->show(); | ||
397 | connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); | ||
398 | connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); | ||
399 | } | ||
400 | QWidget *d = QApplication::desktop(); | 390 | QWidget *d = QApplication::desktop(); |
401 | int w = d->width(); | 391 | int w = d->width(); |
@@ -405,8 +395,28 @@ void VideoWidget::makeVisible() { | |||
405 | int newW=(w/2)-(246/2); //this will only work with 320x240 | 395 | int newW=(w/2)-(246/2); //this will only work with 320x240 |
406 | videoFrame->setGeometry( QRect( newW, 4, 240, 170 ) ); | 396 | videoFrame->setGeometry( QRect( newW, 4, 240, 170 ) ); |
407 | } else | 397 | } else { |
408 | videoFrame->setGeometry( QRect( 0, 30, 240, 170 ) ); | 398 | videoFrame->setGeometry( QRect( 0, 30, 240, 170 ) ); |
399 | } | ||
400 | } | ||
401 | } | ||
402 | |||
403 | |||
404 | void VideoWidget::setSeekable( bool isSeekable ) { | ||
409 | 405 | ||
410 | // qApp->processEvents(); | 406 | if ( !isSeekable || mediaPlayerState->fullscreen() ) { |
407 | qDebug("<<<<<<<<<<<<<<file is STREAMING>>>>>>>>>>>>>>>>>>>"); | ||
408 | if( !slider->isHidden()) { | ||
409 | slider->hide(); | ||
410 | } | ||
411 | disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); | ||
412 | disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); | ||
413 | disconnect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); | ||
414 | disconnect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); | ||
415 | } else { | ||
416 | slider->show(); | ||
417 | connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); | ||
418 | connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); | ||
419 | connect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); | ||
420 | connect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); | ||
411 | } | 421 | } |
412 | } | 422 | } |
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 | |||
@@ -70,4 +70,5 @@ public slots: | |||
70 | void setPosition( long ); | 70 | void setPosition( long ); |
71 | void setLength( long ); | 71 | void setLength( long ); |
72 | void setSeekable( bool ); | ||
72 | void setView( char ); | 73 | void setView( char ); |
73 | 74 | ||
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 | |||
@@ -100,5 +100,5 @@ void XineControl::play( const QString& fileName ) { | |||
100 | } | 100 | } |
101 | // determine if slider is shown | 101 | // determine if slider is shown |
102 | mediaPlayerState->setIsSeekable( !libXine->isSeekable() ); | 102 | mediaPlayerState->setIsSeekable( libXine->isSeekable() ); |
103 | 103 | ||
104 | // which gui (video / audio) | 104 | // which gui (video / audio) |