summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore 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 ) {
}
}
-
-void AudioWidget::toggleButton( int i ) {
- buttons[i].isDown = !buttons[i].isDown;
- QPainter p(this);
- paintButton ( p, i );
-}
-
-
void AudioWidget::paintButton( QPainter &p, int i ) {
if ( buttons[i].isDown ) {
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:
void skipBack();
void stopSkip();
private:
- void toggleButton( int );
void setToggleButton( int, bool );
virtual void paintButton( QPainter &p, int i );
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
buttonMask.pixelIndex( position.x(), position.y() ) == buttonId + 1 );
}
-void MediaWidget::repaintButton( int buttonId )
+void MediaWidget::paintButton( int buttonId )
{
QPainter p( this );
paintButton( p, buttonId );
}
+void MediaWidget::toggleButton( int buttonId )
+{
+ buttons[ buttonId ].isDown = !buttons[ buttonId ].isDown;
+ paintButton( buttonId );
+}
+
/* vim: et sw=4 ts=4
*/
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:
void paintButton( int buttonId );
virtual void paintButton( QPainter &p, int i ) = 0;
+ void toggleButton( int buttonId );
+
MediaPlayerState &mediaPlayerState;
PlayListWidget &playList;
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 ) {
}
}
-void VideoWidget::toggleButton( int i ) {
- buttons[i].isDown = !buttons[i].isDown;
- QPainter p(this);
- paintButton ( p, i );
-}
-
void VideoWidget::paintButton( QPainter &p, int i ) {
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:
virtual void paintButton( QPainter &p, int i );
- void toggleButton( int );
void setToggleButton( int, bool );
QString backgroundPix;