author | simon <simon> | 2002-12-09 15:39:26 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-09 15:39:26 (UTC) |
commit | 21738c78103c42605625f85abf7bfd0d6beaad3f (patch) (unidiff) | |
tree | 0d64cf6453265f4730025d4965b4fff6d1613115 | |
parent | 9aa2442f6ea4e0d58fa7888995ebad04b3692049 (diff) | |
download | opie-21738c78103c42605625f85abf7bfd0d6beaad3f.zip opie-21738c78103c42605625f85abf7bfd0d6beaad3f.tar.gz opie-21738c78103c42605625f85abf7bfd0d6beaad3f.tar.bz2 |
- merged duplicated setToggleButton method
- minor fixlet for paintAllButtons
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 8 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.h | 1 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediawidget.cpp | 12 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediawidget.h | 1 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 6 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.h | 1 |
6 files changed, 12 insertions, 17 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 277d162..8c7e614 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp | |||
@@ -306,12 +306,4 @@ void AudioWidget::updateSlider( long i, long max ) { | |||
306 | } | 306 | } |
307 | 307 | ||
308 | |||
309 | void AudioWidget::setToggleButton( int i, bool down ) { | ||
310 | qDebug("setToggleButton %d", i); | ||
311 | if ( down != buttons[i].isDown ) { | ||
312 | toggleButton( i ); | ||
313 | } | ||
314 | } | ||
315 | |||
316 | void AudioWidget::skipFor() { | 308 | void AudioWidget::skipFor() { |
317 | skipDirection = +1; | 309 | skipDirection = +1; |
diff --git a/noncore/multimedia/opieplayer2/audiowidget.h b/noncore/multimedia/opieplayer2/audiowidget.h index 8c433ac..9b276b5 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.h +++ b/noncore/multimedia/opieplayer2/audiowidget.h | |||
@@ -91,5 +91,4 @@ private slots: | |||
91 | void stopSkip(); | 91 | void stopSkip(); |
92 | private: | 92 | private: |
93 | void setToggleButton( int, bool ); | ||
94 | int skipDirection; | 93 | int skipDirection; |
95 | QString skin; | 94 | QString skin; |
diff --git a/noncore/multimedia/opieplayer2/mediawidget.cpp b/noncore/multimedia/opieplayer2/mediawidget.cpp index 271f788..9c5291b 100644 --- a/noncore/multimedia/opieplayer2/mediawidget.cpp +++ b/noncore/multimedia/opieplayer2/mediawidget.cpp | |||
@@ -98,5 +98,5 @@ void MediaWidget::paintAllButtons( QPainter &p ) | |||
98 | for ( ButtonMap::ConstIterator it = buttons.begin(); | 98 | for ( ButtonMap::ConstIterator it = buttons.begin(); |
99 | it != buttons.end(); ++it ) | 99 | it != buttons.end(); ++it ) |
100 | paintButton( *it ); | 100 | paintButton( p, *it ); |
101 | } | 101 | } |
102 | 102 | ||
@@ -115,4 +115,14 @@ void MediaWidget::paintButton( QPainter &p, const Button &button ) | |||
115 | } | 115 | } |
116 | 116 | ||
117 | void MediaWidget::setToggleButton( int buttonId, bool down ) | ||
118 | { | ||
119 | qDebug("setToggleButton %d", buttonId ); | ||
120 | |||
121 | Button &button = buttons[ buttonId ]; | ||
122 | |||
123 | if ( down != button.isDown ) | ||
124 | toggleButton( buttonId ); | ||
125 | } | ||
126 | |||
117 | void MediaWidget::toggleButton( int buttonId ) | 127 | void MediaWidget::toggleButton( int buttonId ) |
118 | { | 128 | { |
diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h index 34910fb..b7860dc 100644 --- a/noncore/multimedia/opieplayer2/mediawidget.h +++ b/noncore/multimedia/opieplayer2/mediawidget.h | |||
@@ -92,4 +92,5 @@ protected: | |||
92 | void paintButton( QPainter &p, const Button &button ); | 92 | void paintButton( QPainter &p, const Button &button ); |
93 | 93 | ||
94 | void setToggleButton( int buttonId, bool down ); | ||
94 | void toggleButton( int buttonId ); | 95 | void toggleButton( int buttonId ); |
95 | 96 | ||
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index 8f6a8a9..db4a396 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp | |||
@@ -243,10 +243,4 @@ void VideoWidget::updateSlider( long i, long max ) { | |||
243 | } | 243 | } |
244 | 244 | ||
245 | void VideoWidget::setToggleButton( int i, bool down ) { | ||
246 | if ( down != buttons[i].isDown ) { | ||
247 | toggleButton( i ); | ||
248 | } | ||
249 | } | ||
250 | |||
251 | void VideoWidget::mouseMoveEvent( QMouseEvent *event ) { | 245 | void VideoWidget::mouseMoveEvent( QMouseEvent *event ) { |
252 | for ( unsigned int i = 0; i < buttons.count(); i++ ) { | 246 | for ( unsigned int i = 0; i < buttons.count(); i++ ) { |
diff --git a/noncore/multimedia/opieplayer2/videowidget.h b/noncore/multimedia/opieplayer2/videowidget.h index 45279d7..915e9cc 100644 --- a/noncore/multimedia/opieplayer2/videowidget.h +++ b/noncore/multimedia/opieplayer2/videowidget.h | |||
@@ -102,5 +102,4 @@ private: | |||
102 | 102 | ||
103 | 103 | ||
104 | void setToggleButton( int, bool ); | ||
105 | 104 | ||
106 | QString backgroundPix; | 105 | QString backgroundPix; |