author | simon <simon> | 2002-12-09 15:10:48 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-09 15:10:48 (UTC) |
commit | 80902b6ade54252e05cf948040a11b2e975f6759 (patch) (unidiff) | |
tree | d251490e8e1e83af1cd8522736cc02a772463f0f /noncore/multimedia/opieplayer2/audiowidget.cpp | |
parent | e487238141c57df63252e41a47b409cbb1f9ae83 (diff) | |
download | opie-80902b6ade54252e05cf948040a11b2e975f6759.zip opie-80902b6ade54252e05cf948040a11b2e975f6759.tar.gz opie-80902b6ade54252e05cf948040a11b2e975f6759.tar.bz2 |
- paintButton is no more a duplicated method but centralized in the
base class now :)
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 | |||
@@ -313,15 +313,6 @@ void AudioWidget::setToggleButton( int i, bool down ) { | |||
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 ); |
@@ -415,13 +406,13 @@ void AudioWidget::paintEvent( QPaintEvent * pe ) { | |||
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 | ||