From 91932ca42cee5568477b1e49532a0b9e4d9bcf96 Mon Sep 17 00:00:00 2001 From: harlekin Date: Sun, 10 Nov 2002 15:09:09 +0000 Subject: besser seekable handling --- (limited to 'noncore/multimedia/opieplayer2/audiowidget.cpp') 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("<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>"); 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(); } -- cgit v0.9.0.2