summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/audiowidget.cpp
Side-by-side diff
Diffstat (limited to 'noncore/multimedia/opieplayer2/audiowidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp33
1 files changed, 17 insertions, 16 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp
index a6fd334..00d516c 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.cpp
+++ b/noncore/multimedia/opieplayer2/audiowidget.cpp
@@ -189,22 +189,20 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
resizeEvent( NULL );
- connect( &slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) );
- connect( &slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) );
+ connect( &slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) );
+ connect( &slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) );
connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) );
connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) );
connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) );
- // connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( setPaused(bool) ) );
connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) );
+ connect( mediaPlayerState, SIGNAL( isSeekableToggled( bool ) ), this, SLOT( setSeekable( bool ) ) );
connect( this, SIGNAL( forwardClicked() ), this, SLOT( skipFor() ) );
connect( this, SIGNAL( backClicked() ), this, SLOT( skipBack() ) );
connect( this, SIGNAL( forwardReleased() ), this, SLOT( stopSkip() ) );
connect( this, SIGNAL( backReleased() ), this, SLOT( stopSkip() ) );
-
-
// Intialise state
setLength( mediaPlayerState->length() );
setPosition( mediaPlayerState->position() );
@@ -308,9 +306,20 @@ void AudioWidget::setLength( long max ) {
void AudioWidget::setView( char view ) {
- // this isnt working for some reason
+if ( view == 'a' ) {
+ // startTimer( 150 );
+ showMaximized();
+ } else {
+ killTimers();
+ hide();
+ }
+ // qApp->processEvents();
+}
+
+
+void AudioWidget::setSeekable( bool isSeekable ) {
- if ( mediaPlayerState->streaming() ) {
+ if ( isSeekable ) {
qDebug("<<<<<<<<<<<<<<file is STREAMING>>>>>>>>>>>>>>>>>>>");
if( !slider.isHidden()) {
slider.hide();
@@ -321,18 +330,10 @@ void AudioWidget::setView( char view ) {
// this stops the slider from being moved, thus
// does not stop stream when it reaches the end
slider.show();
+ qDebug( " CONNECT SET POSTION " );
connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
}
-
- if ( view == 'a' ) {
- // startTimer( 150 );
- showMaximized();
- } else {
- killTimers();
- hide();
- }
- // qApp->processEvents();
}