summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp8
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.h1
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.cpp8
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.h2
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp6
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.h1
6 files changed, 9 insertions, 17 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp
index 10b1e58..2a158a8 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.cpp
+++ b/noncore/multimedia/opieplayer2/audiowidget.cpp
@@ -332,14 +332,6 @@ void AudioWidget::setToggleButton( int i, bool down ) {
332 } 332 }
333} 333}
334 334
335
336void AudioWidget::toggleButton( int i ) {
337 buttons[i].isDown = !buttons[i].isDown;
338 QPainter p(this);
339 paintButton ( p, i );
340}
341
342
343void AudioWidget::paintButton( QPainter &p, int i ) { 335void AudioWidget::paintButton( QPainter &p, int i ) {
344 if ( buttons[i].isDown ) { 336 if ( buttons[i].isDown ) {
345 p.drawPixmap( upperLeftOfButtonMask, *buttonPixDown[i] ); 337 p.drawPixmap( upperLeftOfButtonMask, *buttonPixDown[i] );
diff --git a/noncore/multimedia/opieplayer2/audiowidget.h b/noncore/multimedia/opieplayer2/audiowidget.h
index a1a839c..4598d51 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.h
+++ b/noncore/multimedia/opieplayer2/audiowidget.h
@@ -91,7 +91,6 @@ private slots:
91 void skipBack(); 91 void skipBack();
92 void stopSkip(); 92 void stopSkip();
93private: 93private:
94 void toggleButton( int );
95 void setToggleButton( int, bool ); 94 void setToggleButton( int, bool );
96 virtual void paintButton( QPainter &p, int i ); 95 virtual void paintButton( QPainter &p, int i );
97 int skipDirection; 96 int skipDirection;
diff --git a/noncore/multimedia/opieplayer2/mediawidget.cpp b/noncore/multimedia/opieplayer2/mediawidget.cpp
index ca84019..62266ad 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.cpp
+++ b/noncore/multimedia/opieplayer2/mediawidget.cpp
@@ -68,11 +68,17 @@ bool MediaWidget::isOverButton( const QPoint &position, int buttonId ) const
68 buttonMask.pixelIndex( position.x(), position.y() ) == buttonId + 1 ); 68 buttonMask.pixelIndex( position.x(), position.y() ) == buttonId + 1 );
69} 69}
70 70
71void MediaWidget::repaintButton( int buttonId ) 71void MediaWidget::paintButton( int buttonId )
72{ 72{
73 QPainter p( this ); 73 QPainter p( this );
74 paintButton( p, buttonId ); 74 paintButton( p, buttonId );
75} 75}
76 76
77void MediaWidget::toggleButton( int buttonId )
78{
79 buttons[ buttonId ].isDown = !buttons[ buttonId ].isDown;
80 paintButton( buttonId );
81}
82
77/* vim: et sw=4 ts=4 83/* vim: et sw=4 ts=4
78 */ 84 */
diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h
index 066d2ac..46c304d 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.h
+++ b/noncore/multimedia/opieplayer2/mediawidget.h
@@ -70,6 +70,8 @@ protected:
70 void paintButton( int buttonId ); 70 void paintButton( int buttonId );
71 virtual void paintButton( QPainter &p, int i ) = 0; 71 virtual void paintButton( QPainter &p, int i ) = 0;
72 72
73 void toggleButton( int buttonId );
74
73 MediaPlayerState &mediaPlayerState; 75 MediaPlayerState &mediaPlayerState;
74 PlayListWidget &playList; 76 PlayListWidget &playList;
75 77
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index 3e677c6..77eab71 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -263,12 +263,6 @@ void VideoWidget::setToggleButton( int i, bool down ) {
263 } 263 }
264} 264}
265 265
266void VideoWidget::toggleButton( int i ) {
267 buttons[i].isDown = !buttons[i].isDown;
268 QPainter p(this);
269 paintButton ( p, i );
270}
271
272void VideoWidget::paintButton( QPainter &p, int i ) { 266void VideoWidget::paintButton( QPainter &p, int i ) {
273 267
274 if ( buttons[i].isDown ) { 268 if ( buttons[i].isDown ) {
diff --git a/noncore/multimedia/opieplayer2/videowidget.h b/noncore/multimedia/opieplayer2/videowidget.h
index 28f720b..24e8741 100644
--- a/noncore/multimedia/opieplayer2/videowidget.h
+++ b/noncore/multimedia/opieplayer2/videowidget.h
@@ -108,7 +108,6 @@ private:
108 108
109 109
110 virtual void paintButton( QPainter &p, int i ); 110 virtual void paintButton( QPainter &p, int i );
111 void toggleButton( int );
112 void setToggleButton( int, bool ); 111 void setToggleButton( int, bool );
113 112
114 QString backgroundPix; 113 QString backgroundPix;