summaryrefslogtreecommitdiff
path: root/noncore/multimedia
authorsimon <simon>2002-12-09 16:31:17 (UTC)
committer simon <simon>2002-12-09 16:31:17 (UTC)
commit8eb71085cec5e24e20b441ceae9e5e66448405b3 (patch) (unidiff)
treee970320e0052c2c5986d3f53a837aec90e2f9177 /noncore/multimedia
parent3b31b000db15e7618b3ef06a652bae41d87a1348 (diff)
downloadopie-8eb71085cec5e24e20b441ceae9e5e66448405b3.zip
opie-8eb71085cec5e24e20b441ceae9e5e66448405b3.tar.gz
opie-8eb71085cec5e24e20b441ceae9e5e66448405b3.tar.bz2
- less indexing
Diffstat (limited to 'noncore/multimedia') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp
index c3e206c..3838e2c 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.cpp
+++ b/noncore/multimedia/opieplayer2/audiowidget.cpp
@@ -118,5 +118,5 @@ AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye
118 for ( int x = 0; x < imgUp.width(); x++ ) 118 for ( int x = 0; x < imgUp.width(); x++ )
119 if ( !qRed( imgMask.pixel( x, y ) ) ) 119 if ( !qRed( imgMask.pixel( x, y ) ) )
120 line[x] = i + 1; 120 line[x] = button.command + 1;
121 } 121 }
122 } 122 }
@@ -339,13 +339,14 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) {
339 339
340 Button &button = buttons[ i ]; 340 Button &button = buttons[ i ];
341 Command command = button.command;
341 342
342 if ( event->state() == QMouseEvent::LeftButton ) { 343 if ( event->state() == QMouseEvent::LeftButton ) {
343 // The test to see if the mouse click is inside the button or not 344 // The test to see if the mouse click is inside the button or not
344 bool isOnButton = isOverButton( event->pos() - upperLeftOfButtonMask, i ); 345 bool isOnButton = isOverButton( event->pos() - upperLeftOfButtonMask, command );
345 346
346 if ( isOnButton && !button.isHeld ) { 347 if ( isOnButton && !button.isHeld ) {
347 button.isHeld = TRUE; 348 button.isHeld = TRUE;
348 toggleButton( button ); 349 toggleButton( button );
349 switch (i) { 350 switch ( command ) {
350 case VolumeUp: 351 case VolumeUp:
351 emit moreClicked(); 352 emit moreClicked();
@@ -360,4 +361,5 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) {
360 emit backClicked(); 361 emit backClicked();
361 return; 362 return;
363 default: break;
362 } 364 }
363 } else if ( !isOnButton && button.isHeld ) { 365 } else if ( !isOnButton && button.isHeld ) {
@@ -372,5 +374,5 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) {
372 } 374 }
373 qDebug("mouseEvent %d", i); 375 qDebug("mouseEvent %d", i);
374 handleCommand( static_cast<Command>( i ), button.isDown ); 376 handleCommand( command, button.isDown );
375 } 377 }
376 } 378 }