author | harlekin <harlekin> | 2002-08-15 16:30:24 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-08-15 16:30:24 (UTC) |
commit | 747a98bb3b2a92b6f3577fa383fc44a8644a7ce2 (patch) (unidiff) | |
tree | 59ec78ec83871cb52ef4b4332cd7c44fa18de737 /noncore/multimedia/opieplayer2/audiowidget.cpp | |
parent | 320f73ae9a8ffc6daf009b3fefb9035506b0f684 (diff) | |
download | opie-747a98bb3b2a92b6f3577fa383fc44a8644a7ce2.zip opie-747a98bb3b2a92b6f3577fa383fc44a8644a7ce2.tar.gz opie-747a98bb3b2a92b6f3577fa383fc44a8644a7ce2.tar.bz2 |
update
Diffstat (limited to 'noncore/multimedia/opieplayer2/audiowidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index a3d34f4..2cb1385 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp | |||
@@ -371,16 +371,17 @@ void AudioWidget::toggleButton( int i ) { | |||
371 | QPainter p(this); | 371 | QPainter p(this); |
372 | paintButton ( &p, i ); | 372 | paintButton ( &p, i ); |
373 | } | 373 | } |
374 | 374 | ||
375 | 375 | ||
376 | void AudioWidget::paintButton( QPainter *p, int i ) { | 376 | void AudioWidget::paintButton( QPainter *p, int i ) { |
377 | if ( audioButtons[i].isDown ) | 377 | if ( audioButtons[i].isDown ) { |
378 | p->drawPixmap( xoff, yoff, *buttonPixDown[i] ); | 378 | p->drawPixmap( xoff, yoff, *buttonPixDown[i] ); |
379 | else | 379 | } else { |
380 | p->drawPixmap( xoff, yoff, *buttonPixUp[i] ); | 380 | p->drawPixmap( xoff, yoff, *buttonPixUp[i] ); |
381 | } | ||
381 | } | 382 | } |
382 | 383 | ||
383 | 384 | ||
384 | void AudioWidget::skipFor() { | 385 | void AudioWidget::skipFor() { |
385 | skipDirection = +1; | 386 | skipDirection = +1; |
386 | startTimer( 50 ); | 387 | startTimer( 50 ); |
@@ -409,26 +410,24 @@ void AudioWidget::timerEvent( QTimerEvent * ) { | |||
409 | } | 410 | } |
410 | 411 | ||
411 | 412 | ||
412 | void AudioWidget::mouseMoveEvent( QMouseEvent *event ) { | 413 | void AudioWidget::mouseMoveEvent( QMouseEvent *event ) { |
413 | for ( int i = 0; i < numButtons; i++ ) { | 414 | for ( int i = 0; i < numButtons; i++ ) { |
414 | if ( event->state() == QMouseEvent::LeftButton ) { | 415 | if ( event->state() == QMouseEvent::LeftButton ) { |
415 | 416 | // The test to see if the mouse click is inside the button or not | |
416 | // The test to see if the mouse click is inside the button or not | ||
417 | int x = event->pos().x() - xoff; | 417 | int x = event->pos().x() - xoff; |
418 | int y = event->pos().y() - yoff; | 418 | int y = event->pos().y() - yoff; |
419 | 419 | ||
420 | bool isOnButton = ( x > 0 && y > 0 && x < imgButtonMask->width() | 420 | bool isOnButton = ( x > 0 && y > 0 && x < imgButtonMask->width() |
421 | && y < imgButtonMask->height() && imgButtonMask->pixelIndex( x, y ) == i + 1 ); | 421 | && y < imgButtonMask->height() |
422 | 422 | && imgButtonMask->pixelIndex( x, y ) == i + 1 ); | |
423 | if ( isOnButton && i == AudioVolumeUp ) | ||
424 | qDebug("on up"); | ||
425 | 423 | ||
426 | if ( isOnButton && !audioButtons[i].isHeld ) { | 424 | if ( isOnButton && !audioButtons[i].isHeld ) { |
427 | audioButtons[i].isHeld = TRUE; | 425 | audioButtons[i].isHeld = TRUE; |
428 | toggleButton(i); | 426 | toggleButton(i); |
427 | |||
429 | switch (i) { | 428 | switch (i) { |
430 | case AudioVolumeUp: | 429 | case AudioVolumeUp: |
431 | qDebug("more clicked"); | 430 | qDebug("more clicked"); |
432 | emit moreClicked(); | 431 | emit moreClicked(); |
433 | return; | 432 | return; |
434 | case AudioVolumeDown: | 433 | case AudioVolumeDown: |