author | simon <simon> | 2002-12-09 15:39:26 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-09 15:39:26 (UTC) |
commit | 21738c78103c42605625f85abf7bfd0d6beaad3f (patch) (side-by-side diff) | |
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 @@ -307,10 +307,2 @@ void AudioWidget::updateSlider( long i, long max ) { - -void AudioWidget::setToggleButton( int i, bool down ) { - qDebug("setToggleButton %d", i); - if ( down != buttons[i].isDown ) { - toggleButton( i ); - } -} - void AudioWidget::skipFor() { 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 @@ -92,3 +92,2 @@ private slots: private: - void setToggleButton( int, bool ); int skipDirection; 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 @@ -99,3 +99,3 @@ void MediaWidget::paintAllButtons( QPainter &p ) it != buttons.end(); ++it ) - paintButton( *it ); + paintButton( p, *it ); } @@ -116,2 +116,12 @@ void MediaWidget::paintButton( QPainter &p, const Button &button ) +void MediaWidget::setToggleButton( int buttonId, bool down ) +{ + qDebug("setToggleButton %d", buttonId ); + + Button &button = buttons[ buttonId ]; + + if ( down != button.isDown ) + toggleButton( buttonId ); +} + void MediaWidget::toggleButton( int buttonId ) 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 @@ -93,2 +93,3 @@ protected: + void setToggleButton( int buttonId, bool down ); void toggleButton( int buttonId ); 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 @@ -244,8 +244,2 @@ void VideoWidget::updateSlider( long i, long max ) { -void VideoWidget::setToggleButton( int i, bool down ) { - if ( down != buttons[i].isDown ) { - toggleButton( i ); - } -} - void VideoWidget::mouseMoveEvent( QMouseEvent *event ) { 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 @@ -103,3 +103,2 @@ private: - void setToggleButton( int, bool ); |