author | simon <simon> | 2002-12-08 22:53:07 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-08 22:53:07 (UTC) |
commit | cb1b7bf6f4dd465cc4f5b268893def8b11ce0bde (patch) (unidiff) | |
tree | 9e6497f79f24c690b5fdb737be5d38a3d5efcee5 | |
parent | 786bc677f61983414df8a4613cc525c4bcd2a054 (diff) | |
download | opie-cb1b7bf6f4dd465cc4f5b268893def8b11ce0bde.zip opie-cb1b7bf6f4dd465cc4f5b268893def8b11ce0bde.tar.gz opie-cb1b7bf6f4dd465cc4f5b268893def8b11ce0bde.tar.bz2 |
- some preparations for further code cleanups for paintButton calls
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 12 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.h | 2 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediawidget.h | 3 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 12 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.h | 2 |
5 files changed, 17 insertions, 14 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index d083273..10b1e58 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp | |||
@@ -338,3 +338,3 @@ void AudioWidget::toggleButton( int i ) { | |||
338 | QPainter p(this); | 338 | QPainter p(this); |
339 | paintButton ( &p, i ); | 339 | paintButton ( p, i ); |
340 | } | 340 | } |
@@ -342,7 +342,7 @@ void AudioWidget::toggleButton( int i ) { | |||
342 | 342 | ||
343 | void AudioWidget::paintButton( QPainter *p, int i ) { | 343 | void AudioWidget::paintButton( QPainter &p, int i ) { |
344 | if ( buttons[i].isDown ) { | 344 | if ( buttons[i].isDown ) { |
345 | p->drawPixmap( upperLeftOfButtonMask, *buttonPixDown[i] ); | 345 | p.drawPixmap( upperLeftOfButtonMask, *buttonPixDown[i] ); |
346 | } else { | 346 | } else { |
347 | p->drawPixmap( upperLeftOfButtonMask, *buttonPixUp[i] ); | 347 | p.drawPixmap( upperLeftOfButtonMask, *buttonPixUp[i] ); |
348 | } | 348 | } |
@@ -444,3 +444,3 @@ void AudioWidget::paintEvent( QPaintEvent * pe ) { | |||
444 | for ( unsigned int i = 0; i < buttons.size(); i++ ) | 444 | for ( unsigned int i = 0; i < buttons.size(); i++ ) |
445 | paintButton( &p, i ); | 445 | paintButton( p, i ); |
446 | QPainter p2( this ); | 446 | QPainter p2( this ); |
@@ -450,3 +450,3 @@ void AudioWidget::paintEvent( QPaintEvent * pe ) { | |||
450 | for ( unsigned int i = 0; i < buttons.size(); i++ ) | 450 | for ( unsigned int i = 0; i < buttons.size(); i++ ) |
451 | paintButton( &p, i ); | 451 | paintButton( p, i ); |
452 | } | 452 | } |
diff --git a/noncore/multimedia/opieplayer2/audiowidget.h b/noncore/multimedia/opieplayer2/audiowidget.h index acf2dda..a1a839c 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.h +++ b/noncore/multimedia/opieplayer2/audiowidget.h | |||
@@ -95,3 +95,3 @@ private: | |||
95 | void setToggleButton( int, bool ); | 95 | void setToggleButton( int, bool ); |
96 | void paintButton( QPainter *p, int i ); | 96 | virtual void paintButton( QPainter &p, int i ); |
97 | int skipDirection; | 97 | int skipDirection; |
diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h index 6e12a3b..066d2ac 100644 --- a/noncore/multimedia/opieplayer2/mediawidget.h +++ b/noncore/multimedia/opieplayer2/mediawidget.h | |||
@@ -69,2 +69,5 @@ protected: | |||
69 | 69 | ||
70 | void paintButton( int buttonId ); | ||
71 | virtual void paintButton( QPainter &p, int i ) = 0; | ||
72 | |||
70 | MediaPlayerState &mediaPlayerState; | 73 | MediaPlayerState &mediaPlayerState; |
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index 6451ac4..3e677c6 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp | |||
@@ -268,11 +268,11 @@ void VideoWidget::toggleButton( int i ) { | |||
268 | QPainter p(this); | 268 | QPainter p(this); |
269 | paintButton ( &p, i ); | 269 | paintButton ( p, i ); |
270 | } | 270 | } |
271 | 271 | ||
272 | void VideoWidget::paintButton( QPainter *p, int i ) { | 272 | void VideoWidget::paintButton( QPainter &p, int i ) { |
273 | 273 | ||
274 | if ( buttons[i].isDown ) { | 274 | if ( buttons[i].isDown ) { |
275 | p->drawPixmap( upperLeftOfButtonMask, *buttonPixDown[i] ); | 275 | p.drawPixmap( upperLeftOfButtonMask, *buttonPixDown[i] ); |
276 | } else { | 276 | } else { |
277 | p->drawPixmap( upperLeftOfButtonMask, *buttonPixUp[i] ); | 277 | p.drawPixmap( upperLeftOfButtonMask, *buttonPixUp[i] ); |
278 | } | 278 | } |
@@ -424,3 +424,3 @@ void VideoWidget::paintEvent( QPaintEvent * pe) { | |||
424 | for ( unsigned int i = 0; i < buttons.size(); i++ ) { | 424 | for ( unsigned int i = 0; i < buttons.size(); i++ ) { |
425 | paintButton( &p, i ); | 425 | paintButton( p, i ); |
426 | } | 426 | } |
@@ -431,3 +431,3 @@ void VideoWidget::paintEvent( QPaintEvent * pe) { | |||
431 | for ( unsigned int i = 0; i < buttons.size(); i++ ) | 431 | for ( unsigned int i = 0; i < buttons.size(); i++ ) |
432 | paintButton( &p, i ); | 432 | paintButton( p, i ); |
433 | } | 433 | } |
diff --git a/noncore/multimedia/opieplayer2/videowidget.h b/noncore/multimedia/opieplayer2/videowidget.h index 2a9f1e0..28f720b 100644 --- a/noncore/multimedia/opieplayer2/videowidget.h +++ b/noncore/multimedia/opieplayer2/videowidget.h | |||
@@ -109,3 +109,3 @@ private: | |||
109 | 109 | ||
110 | void paintButton( QPainter *p, int i ); | 110 | virtual void paintButton( QPainter &p, int i ); |
111 | void toggleButton( int ); | 111 | void toggleButton( int ); |