-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 ) { } - -void AudioWidget::setToggleButton( int i, bool down ) { - qDebug("setToggleButton %d", i); - if ( down != buttons[i].isDown ) { - toggleButton( i ); - } -} - void AudioWidget::skipFor() { 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: void stopSkip(); private: - void setToggleButton( int, bool ); int skipDirection; 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 ) for ( ButtonMap::ConstIterator it = buttons.begin(); it != buttons.end(); ++it ) - paintButton( *it ); + paintButton( p, *it ); } @@ -115,4 +115,14 @@ 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 @@ -92,4 +92,5 @@ protected: void paintButton( QPainter &p, const Button &button ); + 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 @@ -243,10 +243,4 @@ 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 ) { 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: - void setToggleButton( int, bool ); QString backgroundPix; |