Diffstat (limited to 'noncore/multimedia/opieplayer2/audiowidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index c148820..12f91a9 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp | |||
@@ -119,9 +119,9 @@ AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye | |||
119 | line[x] = i + 1; | 119 | line[x] = i + 1; |
120 | } | 120 | } |
121 | } | 121 | } |
122 | 122 | ||
123 | buttons.push_back( button ); | 123 | buttons.insert( i, button ); |
124 | } | 124 | } |
125 | 125 | ||
126 | setBackgroundPixmap( pixBg ); | 126 | setBackgroundPixmap( pixBg ); |
127 | 127 | ||
@@ -207,9 +207,9 @@ void AudioWidget::resizeEvent( QResizeEvent * ) { | |||
207 | 207 | ||
208 | QPixmap pixUp = combineImageWithBackground( imgUp, pixBg, p ); | 208 | QPixmap pixUp = combineImageWithBackground( imgUp, pixBg, p ); |
209 | QPixmap pixDn = combineImageWithBackground( imgDn, pixBg, p ); | 209 | QPixmap pixDn = combineImageWithBackground( imgDn, pixBg, p ); |
210 | 210 | ||
211 | for ( uint i = 0; i < buttons.size(); i++ ) { | 211 | for ( uint i = 0; i < buttons.count(); i++ ) { |
212 | if ( !buttons[i].mask.isNull() ) { | 212 | if ( !buttons[i].mask.isNull() ) { |
213 | buttons[i].pixUp = maskPixToMask( pixUp, buttons[i].mask ); | 213 | buttons[i].pixUp = maskPixToMask( pixUp, buttons[i].mask ); |
214 | buttons[i].pixDown = maskPixToMask( pixDn, buttons[i].mask ); | 214 | buttons[i].pixDown = maskPixToMask( pixDn, buttons[i].mask ); |
215 | } | 215 | } |
@@ -350,9 +350,9 @@ void AudioWidget::timerEvent( QTimerEvent * ) { | |||
350 | } | 350 | } |
351 | 351 | ||
352 | 352 | ||
353 | void AudioWidget::mouseMoveEvent( QMouseEvent *event ) { | 353 | void AudioWidget::mouseMoveEvent( QMouseEvent *event ) { |
354 | for ( unsigned int i = 0; i < buttons.size(); i++ ) { | 354 | for ( unsigned int i = 0; i < buttons.count(); i++ ) { |
355 | if ( event->state() == QMouseEvent::LeftButton ) { | 355 | if ( event->state() == QMouseEvent::LeftButton ) { |
356 | // The test to see if the mouse click is inside the button or not | 356 | // The test to see if the mouse click is inside the button or not |
357 | bool isOnButton = isOverButton( event->pos() - upperLeftOfButtonMask, i ); | 357 | bool isOnButton = isOverButton( event->pos() - upperLeftOfButtonMask, i ); |
358 | 358 | ||
@@ -413,15 +413,15 @@ void AudioWidget::paintEvent( QPaintEvent * pe ) { | |||
413 | QPixmap pix( pe->rect().size() ); | 413 | QPixmap pix( pe->rect().size() ); |
414 | QPainter p( &pix ); | 414 | QPainter p( &pix ); |
415 | p.translate( -pe->rect().topLeft().x(), -pe->rect().topLeft().y() ); | 415 | p.translate( -pe->rect().topLeft().x(), -pe->rect().topLeft().y() ); |
416 | p.drawTiledPixmap( pe->rect(), pixBg, pe->rect().topLeft() ); | 416 | p.drawTiledPixmap( pe->rect(), pixBg, pe->rect().topLeft() ); |
417 | for ( unsigned int i = 0; i < buttons.size(); i++ ) | 417 | for ( unsigned int i = 0; i < buttons.count(); i++ ) |
418 | paintButton( p, i ); | 418 | paintButton( p, i ); |
419 | QPainter p2( this ); | 419 | QPainter p2( this ); |
420 | p2.drawPixmap( pe->rect().topLeft(), pix ); | 420 | p2.drawPixmap( pe->rect().topLeft(), pix ); |
421 | } else { | 421 | } else { |
422 | QPainter p( this ); | 422 | QPainter p( this ); |
423 | for ( unsigned int i = 0; i < buttons.size(); i++ ) | 423 | for ( unsigned int i = 0; i < buttons.count(); i++ ) |
424 | paintButton( p, i ); | 424 | paintButton( p, i ); |
425 | } | 425 | } |
426 | } | 426 | } |
427 | 427 | ||