summaryrefslogtreecommitdiff
path: root/noncore
authorsimon <simon>2002-12-08 22:58:45 (UTC)
committer simon <simon>2002-12-08 22:58:45 (UTC)
commit7b38c0424eca2f49a0c9a931766c816e21f1d86b (patch) (side-by-side diff)
treee310c27ad3592e46fc1a46d963ae24b2f299c949 /noncore
parentdf6b6a0222e99736284ed8ebb9a7d8068751339b (diff)
downloadopie-7b38c0424eca2f49a0c9a931766c816e21f1d86b.zip
opie-7b38c0424eca2f49a0c9a931766c816e21f1d86b.tar.gz
opie-7b38c0424eca2f49a0c9a931766c816e21f1d86b.tar.bz2
- merged the two duplicated toggleButton methods into a shared one
Diffstat (limited to 'noncore') (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
@@ -334,10 +334,2 @@ 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 ) {
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
@@ -93,3 +93,2 @@ private slots:
private:
- void toggleButton( int );
void setToggleButton( int, bool );
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
@@ -70,3 +70,3 @@ bool MediaWidget::isOverButton( const QPoint &position, int buttonId ) const
-void MediaWidget::repaintButton( int buttonId )
+void MediaWidget::paintButton( int buttonId )
{
@@ -76,2 +76,8 @@ void MediaWidget::repaintButton( int 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
@@ -72,2 +72,4 @@ protected:
+ void toggleButton( int buttonId );
+
MediaPlayerState &mediaPlayerState;
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
@@ -265,8 +265,2 @@ 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 ) {
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
@@ -110,3 +110,2 @@ private:
virtual void paintButton( QPainter &p, int i );
- void toggleButton( int );
void setToggleButton( int, bool );