summaryrefslogtreecommitdiff
path: root/core/multimedia
authorllornkcor <llornkcor>2002-04-21 14:06:57 (UTC)
committer llornkcor <llornkcor>2002-04-21 14:06:57 (UTC)
commit05158fd95b12800666a7a0620a32390e61979385 (patch) (unidiff)
tree5b62d42fada3eda8a518389fc04d3aaf2f02aefd /core/multimedia
parent2da038246124a92248add8195126ac7bd21512f6 (diff)
downloadopie-05158fd95b12800666a7a0620a32390e61979385.zip
opie-05158fd95b12800666a7a0620a32390e61979385.tar.gz
opie-05158fd95b12800666a7a0620a32390e61979385.tar.bz2
really fixed slider
Diffstat (limited to 'core/multimedia') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/audiowidget.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/core/multimedia/opieplayer/audiowidget.cpp b/core/multimedia/opieplayer/audiowidget.cpp
index b9561d5..e2e3603 100644
--- a/core/multimedia/opieplayer/audiowidget.cpp
+++ b/core/multimedia/opieplayer/audiowidget.cpp
@@ -90,24 +90,18 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
90 connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); 90 connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) );
91 connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) ); 91 connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) );
92 connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) ); 92 connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) );
93 connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( setPaused(bool) ) ); 93 connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( setPaused(bool) ) );
94 connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); 94 connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) );
95 95
96 if( !mediaPlayerState->isStreaming) { // this stops the slider from being moved, thus
97 // does not stop stream when it reaches the end
98 connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
99 connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
100 }
101 // Intialise state 96 // Intialise state
102 setLength( mediaPlayerState->length() ); 97 setLength( mediaPlayerState->length() );
103 setPosition( mediaPlayerState->position() ); 98 setPosition( mediaPlayerState->position() );
104 setLooping( mediaPlayerState->fullscreen() ); 99 setLooping( mediaPlayerState->fullscreen() );
105 setPaused( mediaPlayerState->paused() ); 100 setPaused( mediaPlayerState->paused() );
106 setPlaying( mediaPlayerState->playing() ); 101 setPlaying( mediaPlayerState->playing() );
107 if (mediaPlayerState->isStreaming) slider->hide();
108 102
109} 103}
110 104
111 105
112AudioWidget::~AudioWidget() { 106AudioWidget::~AudioWidget() {
113 for ( int i = 0; i < 4; i++ ) 107 for ( int i = 0; i < 4; i++ )
@@ -140,12 +134,24 @@ void AudioWidget::setPosition( long i ) {
140void AudioWidget::setLength( long max ) { 134void AudioWidget::setLength( long max ) {
141 updateSlider( mediaPlayerState->position(), max ); 135 updateSlider( mediaPlayerState->position(), max );
142} 136}
143 137
144 138
145void AudioWidget::setView( char view ) { 139void AudioWidget::setView( char view ) {
140 if (mediaPlayerState->isStreaming) {
141 if( !slider->isHidden()) slider->hide();
142 disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
143 disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
144 } else {
145// this stops the slider from being moved, thus
146 // does not stop stream when it reaches the end
147 if( slider->isHidden()) slider->show();
148 connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
149 connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
150 }
151
146 if ( view == 'a' ) { 152 if ( view == 'a' ) {
147 startTimer( 150 ); 153 startTimer( 150 );
148 showMaximized(); 154 showMaximized();
149 } else { 155 } else {
150 killTimers(); 156 killTimers();
151 hide(); 157 hide();