summaryrefslogtreecommitdiff
authorsimon <simon>2002-12-09 13:40:24 (UTC)
committer simon <simon>2002-12-09 13:40:24 (UTC)
commitd0d993b584bba77905955466897a50cea758103c (patch) (unidiff)
treefabf38ac7ef2d454a311bd2d264ca1eeab02e2b0
parentd1324d850a3c8269bd6009de6fdf6c321954b371 (diff)
downloadopie-d0d993b584bba77905955466897a50cea758103c.zip
opie-d0d993b584bba77905955466897a50cea758103c.tar.gz
opie-d0d993b584bba77905955466897a50cea758103c.tar.bz2
- buttonPixUp/Down are now vectors, too
- removed unused and uninitialized pixmaps array
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp22
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.h6
2 files changed, 10 insertions, 18 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp
index fe7ddc1..2081b4f 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.cpp
+++ b/noncore/multimedia/opieplayer2/audiowidget.cpp
@@ -131,6 +131,4 @@ AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye
131 131
132 for ( int i = 0; i < 10; i++ ) { 132 buttonPixUp.resize( masks.size(), QPixmap() );
133 buttonPixUp[i] = 0l; 133 buttonPixDown.resize( masks.size(), QPixmap() );
134 buttonPixDown[i] = 0l;
135 }
136 134
@@ -182,6 +180,2 @@ AudioWidget::~AudioWidget() {
182 180
183 for ( int i = 0; i < 10; i++ ) {
184 delete buttonPixUp[i];
185 delete buttonPixDown[i];
186 }
187// mediaPlayerState->setPlaying(false); 181// mediaPlayerState->setPlaying(false);
@@ -200,5 +194,5 @@ QPixmap combineImageWithBackground( QImage img, QPixmap bg, QPoint offset ) {
200 194
201QPixmap *maskPixToMask( QPixmap pix, QBitmap mask ) { 195QPixmap maskPixToMask( QPixmap pix, QBitmap mask ) {
202 QPixmap *pixmap = new QPixmap( pix ); 196 QPixmap pixmap( pix );
203 pixmap->setMask( mask ); 197 pixmap.setMask( mask );
204 return pixmap; 198 return pixmap;
@@ -227,4 +221,2 @@ void AudioWidget::resizeEvent( QResizeEvent * ) {
227 if ( !masks[i].isNull() ) { 221 if ( !masks[i].isNull() ) {
228 delete buttonPixUp[i];
229 delete buttonPixDown[i];
230 buttonPixUp[i] = maskPixToMask( pixUp, masks[i] ); 222 buttonPixUp[i] = maskPixToMask( pixUp, masks[i] );
@@ -334,5 +326,5 @@ void AudioWidget::paintButton( QPainter &p, int i ) {
334 if ( buttons[i].isDown ) { 326 if ( buttons[i].isDown ) {
335 p.drawPixmap( upperLeftOfButtonMask, *buttonPixDown[i] ); 327 p.drawPixmap( upperLeftOfButtonMask, buttonPixDown[i] );
336 } else { 328 } else {
337 p.drawPixmap( upperLeftOfButtonMask, *buttonPixUp[i] ); 329 p.drawPixmap( upperLeftOfButtonMask, buttonPixUp[i] );
338 } 330 }
diff --git a/noncore/multimedia/opieplayer2/audiowidget.h b/noncore/multimedia/opieplayer2/audiowidget.h
index bc7262c..73ce1e5 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.h
+++ b/noncore/multimedia/opieplayer2/audiowidget.h
@@ -94,2 +94,3 @@ private:
94 typedef std::vector<QBitmap> MaskVector; 94 typedef std::vector<QBitmap> MaskVector;
95 typedef std::vector<QPixmap> PixmapVector;
95 96
@@ -103,6 +104,5 @@ private:
103 MaskVector masks; 104 MaskVector masks;
104 QPixmap *buttonPixUp[10]; 105 PixmapVector buttonPixUp;
105 QPixmap *buttonPixDown[10]; 106 PixmapVector buttonPixDown;
106 107
107 QPixmap *pixmaps[4];
108 OTicker songInfo; 108 OTicker songInfo;