summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.cpp14
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.h1
2 files changed, 10 insertions, 5 deletions
diff --git a/noncore/multimedia/opieplayer2/mediawidget.cpp b/noncore/multimedia/opieplayer2/mediawidget.cpp
index b73a5c0..271f788 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.cpp
+++ b/noncore/multimedia/opieplayer2/mediawidget.cpp
@@ -62,5 +62,3 @@ void MediaWidget::paintEvent( QPaintEvent *pe )
p.drawTiledPixmap( pe->rect(), backgroundPixmap, pe->rect().topLeft() );
- for ( unsigned int i = 0; i < buttons.count(); i++ ) {
- paintButton( p, buttons[ i ] );
- }
+ paintAllButtons( p );
QPainter p2( this );
@@ -69,4 +67,3 @@ void MediaWidget::paintEvent( QPaintEvent *pe )
QPainter p( this );
- for ( unsigned int i = 0; i < buttons.count(); i++ )
- paintButton( p, buttons[ i ] );
+ paintAllButtons( p );
}
@@ -98,2 +95,9 @@ bool MediaWidget::isOverButton( const QPoint &position, int buttonId ) const
+void MediaWidget::paintAllButtons( QPainter &p )
+{
+ for ( ButtonMap::ConstIterator it = buttons.begin();
+ it != buttons.end(); ++it )
+ paintButton( *it );
+}
+
void MediaWidget::paintButton( const Button &button )
diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h
index dcf7fb8..34910fb 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.h
+++ b/noncore/multimedia/opieplayer2/mediawidget.h
@@ -89,2 +89,3 @@ protected:
+ void paintAllButtons( QPainter &p );
void paintButton( const Button &button );