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.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp
index 0e9e7ea..955169c 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.cpp
+++ b/noncore/multimedia/opieplayer2/audiowidget.cpp
@@ -67,9 +67,9 @@ struct MediaButton {
67//Layout information for the audioButtons (and if it is a toggle button or not) 67//Layout information for the audioButtons (and if it is a toggle button or not)
68MediaButton audioButtons[] = { 68MediaButton audioButtons[] = {
69 { TRUE, FALSE, FALSE }, // play 69 { TRUE, FALSE, FALSE }, // play
70 { FALSE, FALSE, FALSE }, // stop 70 { FALSE, FALSE, FALSE }, // stop
71 { TRUE, FALSE, FALSE }, // pause 71 { FALSE, FALSE, FALSE }, // pause
72 { FALSE, FALSE, FALSE }, // next 72 { FALSE, FALSE, FALSE }, // next
73 { FALSE, FALSE, FALSE }, // previous 73 { FALSE, FALSE, FALSE }, // previous
74 { FALSE, FALSE, FALSE }, // volume up 74 { FALSE, FALSE, FALSE }, // volume up
75 { FALSE, FALSE, FALSE }, // volume down 75 { FALSE, FALSE, FALSE }, // volume down
@@ -341,12 +341,8 @@ void AudioWidget::paintButton( QPainter *p, int i ) {
341} 341}
342 342
343 343
344void AudioWidget::timerEvent( QTimerEvent * ) { 344void AudioWidget::timerEvent( QTimerEvent * ) {
345// static int frame = 0;
346// if ( !mediaPlayerState->paused() && audioButtons[ AudioPlay ].isDown ) {
347// frame = frame >= 7 ? 0 : frame + 1;
348// }
349} 345}
350 346
351 347
352void AudioWidget::mouseMoveEvent( QMouseEvent *event ) { 348void AudioWidget::mouseMoveEvent( QMouseEvent *event ) {
@@ -370,23 +366,27 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) {
370 case AudioVolumeUp: 366 case AudioVolumeUp:
371 qDebug("more clicked"); 367 qDebug("more clicked");
372 emit moreClicked(); 368 emit moreClicked();
373 return; 369 return;
374 case AudioVolumeDown: emit lessClicked(); return; 370 case AudioVolumeDown:
371 emit lessClicked();
372 return;
375 } 373 }
376 } else if ( !isOnButton && audioButtons[i].isHeld ) { 374 } else if ( !isOnButton && audioButtons[i].isHeld ) {
377 audioButtons[i].isHeld = FALSE; 375 audioButtons[i].isHeld = FALSE;
378 toggleButton(i); 376 toggleButton(i);
379 } 377 }
380 } else { 378 } else {
381 if ( audioButtons[i].isHeld ) { 379 if ( audioButtons[i].isHeld ) {
382 audioButtons[i].isHeld = FALSE; 380 audioButtons[i].isHeld = FALSE;
383 if ( !audioButtons[i].isToggle ) 381 if ( !audioButtons[i].isToggle ) {
384 setToggleButton( i, FALSE ); 382 setToggleButton( i, FALSE );
383 qDebug("button toggled3 %d",i);
384 }
385 switch (i) { 385 switch (i) {
386 case AudioPlay: mediaPlayerState->setPlaying(audioButtons[i].isDown); return; 386 case AudioPlay: mediaPlayerState->setPlaying(audioButtons[i].isDown); return;
387 case AudioStop: mediaPlayerState->setPlaying(FALSE); return; 387 case AudioStop: mediaPlayerState->setPlaying(FALSE); return;
388 case AudioPause: mediaPlayerState->setPaused(audioButtons[i].isDown); return; 388 case AudioPause: mediaPlayerState->setPaused( audioButtons[i].isDown); return;
389 case AudioNext: mediaPlayerState->setNext(); return; 389 case AudioNext: mediaPlayerState->setNext(); return;
390 case AudioPrevious: mediaPlayerState->setPrev(); return; 390 case AudioPrevious: mediaPlayerState->setPrev(); return;
391 case AudioLoop: mediaPlayerState->setLooping(audioButtons[i].isDown); return; 391 case AudioLoop: mediaPlayerState->setLooping(audioButtons[i].isDown); return;
392 case AudioVolumeUp: emit moreReleased(); return; 392 case AudioVolumeUp: emit moreReleased(); return;