Diffstat (limited to 'noncore/multimedia/opieplayer2/audiowidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 12f91a9..5cc2814 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp | |||
@@ -310,21 +310,12 @@ void AudioWidget::setToggleButton( int i, bool down ) { | |||
310 | qDebug("setToggleButton %d", i); | 310 | qDebug("setToggleButton %d", i); |
311 | if ( down != buttons[i].isDown ) { | 311 | if ( down != buttons[i].isDown ) { |
312 | toggleButton( i ); | 312 | toggleButton( i ); |
313 | } | 313 | } |
314 | } | 314 | } |
315 | 315 | ||
316 | void AudioWidget::paintButton( QPainter &p, int i ) { | ||
317 | if ( buttons[i].isDown ) { | ||
318 | p.drawPixmap( upperLeftOfButtonMask, buttons[i].pixDown ); | ||
319 | } else { | ||
320 | p.drawPixmap( upperLeftOfButtonMask, buttons[i].pixUp ); | ||
321 | } | ||
322 | } | ||
323 | |||
324 | |||
325 | void AudioWidget::skipFor() { | 316 | void AudioWidget::skipFor() { |
326 | skipDirection = +1; | 317 | skipDirection = +1; |
327 | startTimer( 50 ); | 318 | startTimer( 50 ); |
328 | mediaPlayerState.setPosition( mediaPlayerState.position() + 2 ); | 319 | mediaPlayerState.setPosition( mediaPlayerState.position() + 2 ); |
329 | } | 320 | } |
330 | 321 | ||
@@ -412,19 +403,19 @@ void AudioWidget::paintEvent( QPaintEvent * pe ) { | |||
412 | // Combine with background and double buffer | 403 | // Combine with background and double buffer |
413 | QPixmap pix( pe->rect().size() ); | 404 | QPixmap pix( pe->rect().size() ); |
414 | QPainter p( &pix ); | 405 | QPainter p( &pix ); |
415 | p.translate( -pe->rect().topLeft().x(), -pe->rect().topLeft().y() ); | 406 | p.translate( -pe->rect().topLeft().x(), -pe->rect().topLeft().y() ); |
416 | p.drawTiledPixmap( pe->rect(), pixBg, pe->rect().topLeft() ); | 407 | p.drawTiledPixmap( pe->rect(), pixBg, pe->rect().topLeft() ); |
417 | for ( unsigned int i = 0; i < buttons.count(); i++ ) | 408 | for ( unsigned int i = 0; i < buttons.count(); i++ ) |
418 | paintButton( p, i ); | 409 | paintButton( p, buttons[ i ] ); |
419 | QPainter p2( this ); | 410 | QPainter p2( this ); |
420 | p2.drawPixmap( pe->rect().topLeft(), pix ); | 411 | p2.drawPixmap( pe->rect().topLeft(), pix ); |
421 | } else { | 412 | } else { |
422 | QPainter p( this ); | 413 | QPainter p( this ); |
423 | for ( unsigned int i = 0; i < buttons.count(); i++ ) | 414 | for ( unsigned int i = 0; i < buttons.count(); i++ ) |
424 | paintButton( p, i ); | 415 | paintButton( p, buttons[ i ] ); |
425 | } | 416 | } |
426 | } | 417 | } |
427 | 418 | ||
428 | void AudioWidget::keyReleaseEvent( QKeyEvent *e) { | 419 | void AudioWidget::keyReleaseEvent( QKeyEvent *e) { |
429 | switch ( e->key() ) { | 420 | switch ( e->key() ) { |
430 | ////////////////////////////// Zaurus keys | 421 | ////////////////////////////// Zaurus keys |