summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/audiowidget.cpp
Unidiff
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) :
189 189
190 resizeEvent( NULL ); 190 resizeEvent( NULL );
191 191
192 connect( &slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); 192 connect( &slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) );
193 connect( &slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); 193 connect( &slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) );
194 194
195 connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); 195 connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) );
196 connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) ); 196 connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) );
197 connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) ); 197 connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) );
198 // connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( setPaused(bool) ) );
199 connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); 198 connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) );
199 connect( mediaPlayerState, SIGNAL( isSeekableToggled( bool ) ), this, SLOT( setSeekable( bool ) ) );
200 200
201 connect( this, SIGNAL( forwardClicked() ), this, SLOT( skipFor() ) ); 201 connect( this, SIGNAL( forwardClicked() ), this, SLOT( skipFor() ) );
202 connect( this, SIGNAL( backClicked() ), this, SLOT( skipBack() ) ); 202 connect( this, SIGNAL( backClicked() ), this, SLOT( skipBack() ) );
203 connect( this, SIGNAL( forwardReleased() ), this, SLOT( stopSkip() ) ); 203 connect( this, SIGNAL( forwardReleased() ), this, SLOT( stopSkip() ) );
204 connect( this, SIGNAL( backReleased() ), this, SLOT( stopSkip() ) ); 204 connect( this, SIGNAL( backReleased() ), this, SLOT( stopSkip() ) );
205 205
206
207
208 // Intialise state 206 // Intialise state
209 setLength( mediaPlayerState->length() ); 207 setLength( mediaPlayerState->length() );
210 setPosition( mediaPlayerState->position() ); 208 setPosition( mediaPlayerState->position() );
@@ -308,9 +306,20 @@ void AudioWidget::setLength( long max ) {
308 306
309void AudioWidget::setView( char view ) { 307void AudioWidget::setView( char view ) {
310 308
311 // this isnt working for some reason 309if ( view == 'a' ) {
310 // startTimer( 150 );
311 showMaximized();
312 } else {
313 killTimers();
314 hide();
315 }
316 // qApp->processEvents();
317}
318
319
320void AudioWidget::setSeekable( bool isSeekable ) {
312 321
313 if ( mediaPlayerState->streaming() ) { 322 if ( isSeekable ) {
314 qDebug("<<<<<<<<<<<<<<file is STREAMING>>>>>>>>>>>>>>>>>>>"); 323 qDebug("<<<<<<<<<<<<<<file is STREAMING>>>>>>>>>>>>>>>>>>>");
315 if( !slider.isHidden()) { 324 if( !slider.isHidden()) {
316 slider.hide(); 325 slider.hide();
@@ -321,18 +330,10 @@ void AudioWidget::setView( char view ) {
321 // this stops the slider from being moved, thus 330 // this stops the slider from being moved, thus
322 // does not stop stream when it reaches the end 331 // does not stop stream when it reaches the end
323 slider.show(); 332 slider.show();
333 qDebug( " CONNECT SET POSTION " );
324 connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); 334 connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
325 connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); 335 connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
326 } 336 }
327
328 if ( view == 'a' ) {
329 // startTimer( 150 );
330 showMaximized();
331 } else {
332 killTimers();
333 hide();
334 }
335 // qApp->processEvents();
336} 337}
337 338
338 339