summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp26
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.h3
2 files changed, 14 insertions, 15 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp
index cc6187c..132a911 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.cpp
+++ b/noncore/multimedia/opieplayer2/audiowidget.cpp
@@ -190,7 +190,7 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
190 connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); 190 connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) );
191 connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) ); 191 connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) );
192 connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) ); 192 connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) );
193 connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( setPaused(bool) ) ); 193// connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( setPaused(bool) ) );
194 connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); 194 connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) );
195 195
196 connect( this, SIGNAL( forwardClicked() ), this, SLOT( skipFor() ) ); 196 connect( this, SIGNAL( forwardClicked() ), this, SLOT( skipFor() ) );
@@ -204,7 +204,7 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
204 setLength( mediaPlayerState->length() ); 204 setLength( mediaPlayerState->length() );
205 setPosition( mediaPlayerState->position() ); 205 setPosition( mediaPlayerState->position() );
206 setLooping( mediaPlayerState->fullscreen() ); 206 setLooping( mediaPlayerState->fullscreen() );
207 setPaused( mediaPlayerState->paused() ); 207// setPaused( mediaPlayerState->paused() );
208 setPlaying( mediaPlayerState->playing() ); 208 setPlaying( mediaPlayerState->playing() );
209 209
210} 210}
@@ -359,6 +359,7 @@ void AudioWidget::updateSlider( long i, long max ) {
359 359
360 360
361void AudioWidget::setToggleButton( int i, bool down ) { 361void AudioWidget::setToggleButton( int i, bool down ) {
362 qDebug("setToggleButton %d", i);
362 if ( down != audioButtons[i].isDown ) { 363 if ( down != audioButtons[i].isDown ) {
363 toggleButton( i ); 364 toggleButton( i );
364 } 365 }
@@ -423,7 +424,6 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) {
423 if ( isOnButton && !audioButtons[i].isHeld ) { 424 if ( isOnButton && !audioButtons[i].isHeld ) {
424 audioButtons[i].isHeld = TRUE; 425 audioButtons[i].isHeld = TRUE;
425 toggleButton(i); 426 toggleButton(i);
426
427 switch (i) { 427 switch (i) {
428 case AudioVolumeUp: 428 case AudioVolumeUp:
429 emit moreClicked(); 429 emit moreClicked();
@@ -438,25 +438,25 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) {
438 emit backClicked(); 438 emit backClicked();
439 return; 439 return;
440 } 440 }
441 } else if ( !isOnButton && audioButtons[i].isHeld ) {
442 audioButtons[i].isHeld = FALSE;
443 toggleButton(i);
444 } 441 }
442 else if ( !isOnButton && audioButtons[i].isHeld ) {
443 audioButtons[i].isHeld = FALSE;
444 toggleButton(i);
445 }
445 } else { 446 } else {
446 if ( audioButtons[i].isHeld ) { 447 if ( audioButtons[i].isHeld ) {
447 audioButtons[i].isHeld = FALSE; 448 audioButtons[i].isHeld = FALSE;
448 if ( !audioButtons[i].isToggle ) { 449 if ( !audioButtons[i].isToggle ) {
449 setToggleButton( i, FALSE ); 450 setToggleButton( i, FALSE );
450 qDebug("button toggled3 %d",i);
451 } 451 }
452 switch (i) { 452 switch (i) {
453 case AudioPlay: 453 case AudioPlay:
454 if( mediaPlayerState->isPaused ) { 454 if( mediaPlayerState->isPaused ) {
455 setToggleButton( i, FALSE ); 455// setToggleButton( i, FALSE );
456 mediaPlayerState->setPaused( FALSE ); 456 mediaPlayerState->setPaused( FALSE );
457 return; 457 return;
458 } else if( !mediaPlayerState->isPaused ) { 458 } else if( !mediaPlayerState->isPaused ) {
459 setToggleButton( i, TRUE ); 459// setToggleButton( i, TRUE );
460 mediaPlayerState->setPaused( TRUE ); 460 mediaPlayerState->setPaused( TRUE );
461 return; 461 return;
462 } else { 462 } else {
@@ -549,16 +549,16 @@ void AudioWidget::keyReleaseEvent( QKeyEvent *e)
549 } 549 }
550 break; 550 break;
551 case Key_Down: 551 case Key_Down:
552 toggleButton(6); 552// toggleButton(6);
553 emit lessClicked(); 553 emit lessClicked();
554 emit lessReleased(); 554 emit lessReleased();
555 toggleButton(6); 555// toggleButton(6);
556 break; 556 break;
557 case Key_Up: 557 case Key_Up:
558 toggleButton(5); 558// toggleButton(5);
559 emit moreClicked(); 559 emit moreClicked();
560 emit moreReleased(); 560 emit moreReleased();
561 toggleButton(5); 561// toggleButton(5);
562 break; 562 break;
563 case Key_Right: 563 case Key_Right:
564// toggleButton(3); 564// toggleButton(3);
diff --git a/noncore/multimedia/opieplayer2/audiowidget.h b/noncore/multimedia/opieplayer2/audiowidget.h
index 772d1d1..e7da6c5 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.h
+++ b/noncore/multimedia/opieplayer2/audiowidget.h
@@ -49,7 +49,6 @@ class QPixmap;
49enum AudioButtons { 49enum AudioButtons {
50 AudioPlay=0, 50 AudioPlay=0,
51 AudioStop, 51 AudioStop,
52 AudioPause,
53 AudioNext, 52 AudioNext,
54 AudioPrevious, 53 AudioPrevious,
55 AudioVolumeUp, 54 AudioVolumeUp,
@@ -89,7 +88,7 @@ public slots:
89 void updateSlider( long, long ); 88 void updateSlider( long, long );
90 void sliderPressed( ); 89 void sliderPressed( );
91 void sliderReleased( ); 90 void sliderReleased( );
92 void setPaused( bool b) { setToggleButton( AudioPause, b ); } 91// 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 ); }
95 void setPosition( long ); 94 void setPosition( long );