summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp19
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.h1
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.cpp28
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.h2
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp31
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.h1
6 files changed, 30 insertions, 52 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp
index 553c56b..277d162 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.cpp
+++ b/noncore/multimedia/opieplayer2/audiowidget.cpp
@@ -399,21 +399,2 @@ void AudioWidget::showEvent( QShowEvent* ) {
-
-void AudioWidget::paintEvent( QPaintEvent * pe ) {
- if ( !pe->erased() ) {
- // Combine with background and double buffer
- QPixmap pix( pe->rect().size() );
- QPainter p( &pix );
- p.translate( -pe->rect().topLeft().x(), -pe->rect().topLeft().y() );
- p.drawTiledPixmap( pe->rect(), backgroundPixmap, pe->rect().topLeft() );
- for ( unsigned int i = 0; i < buttons.count(); i++ )
- paintButton( p, buttons[ i ] );
- QPainter p2( this );
- p2.drawPixmap( pe->rect().topLeft(), pix );
- } else {
- QPainter p( this );
- for ( unsigned int i = 0; i < buttons.count(); i++ )
- paintButton( p, buttons[ i ] );
- }
-}
-
void AudioWidget::keyReleaseEvent( QKeyEvent *e) {
diff --git a/noncore/multimedia/opieplayer2/audiowidget.h b/noncore/multimedia/opieplayer2/audiowidget.h
index 69837cd..8c433ac 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.h
+++ b/noncore/multimedia/opieplayer2/audiowidget.h
@@ -80,3 +80,2 @@ protected:
void doUnblank();
- void paintEvent( QPaintEvent *pe );
void showEvent( QShowEvent *se );
diff --git a/noncore/multimedia/opieplayer2/mediawidget.cpp b/noncore/multimedia/opieplayer2/mediawidget.cpp
index f977b61..3a44185 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.cpp
+++ b/noncore/multimedia/opieplayer2/mediawidget.cpp
@@ -46,2 +46,30 @@ void MediaWidget::closeEvent( QCloseEvent * )
+void MediaWidget::paintEvent( QPaintEvent *pe )
+{
+ QPainter p( this );
+
+ if ( mediaPlayerState.isFullscreen() ) {
+ // Clear the background
+ p.setBrush( QBrush( Qt::black ) );
+ return;
+ }
+
+ if ( !pe->erased() ) {
+ // Combine with background and double buffer
+ QPixmap pix( pe->rect().size() );
+ QPainter p( &pix );
+ p.translate( -pe->rect().topLeft().x(), -pe->rect().topLeft().y() );
+ p.drawTiledPixmap( pe->rect(), backgroundPixmap, pe->rect().topLeft() );
+ for ( unsigned int i = 0; i < buttons.count(); i++ ) {
+ paintButton( p, buttons[ i ] );
+ }
+ QPainter p2( this );
+ p2.drawPixmap( pe->rect().topLeft(), pix );
+ } else {
+ QPainter p( this );
+ for ( unsigned int i = 0; i < buttons.count(); i++ )
+ paintButton( p, buttons[ i ] );
+ }
+}
+
void MediaWidget::handleCommand( Command command, bool buttonDown )
diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h
index 211e56c..8cdaad1 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.h
+++ b/noncore/multimedia/opieplayer2/mediawidget.h
@@ -83,2 +83,4 @@ protected:
+ virtual void paintEvent( QPaintEvent *pe );
+
void handleCommand( Command command, bool buttonDown );
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index a8bf252..8f6a8a9 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -377,33 +377,2 @@ void VideoWidget::makeVisible() {
-
-
-
-void VideoWidget::paintEvent( QPaintEvent * pe) {
- QPainter p( this );
-
- if ( mediaPlayerState.isFullscreen() ) {
- // Clear the background
- p.setBrush( QBrush( Qt::black ) );
- } else {
- if ( !pe->erased() ) {
- // Combine with background and double buffer
- QPixmap pix( pe->rect().size() );
- QPainter p( &pix );
- p.translate( -pe->rect().topLeft().x(), -pe->rect().topLeft().y() );
- p.drawTiledPixmap( pe->rect(), backgroundPixmap, pe->rect().topLeft() );
- for ( unsigned int i = 0; i < buttons.count(); i++ ) {
- paintButton( p, buttons[ i ] );
- }
- QPainter p2( this );
- p2.drawPixmap( pe->rect().topLeft(), pix );
- } else {
- QPainter p( this );
- for ( unsigned int i = 0; i < buttons.count(); i++ )
- paintButton( p, buttons[ i ] );
- }
- //slider->repaint( TRUE );
- }
-}
-
-
void VideoWidget::keyReleaseEvent( QKeyEvent *e) {
diff --git a/noncore/multimedia/opieplayer2/videowidget.h b/noncore/multimedia/opieplayer2/videowidget.h
index 9d5239b..45279d7 100644
--- a/noncore/multimedia/opieplayer2/videowidget.h
+++ b/noncore/multimedia/opieplayer2/videowidget.h
@@ -90,3 +90,2 @@ protected:
void resizeEvent( QResizeEvent * );
- void paintEvent( QPaintEvent *pe );
void showEvent( QShowEvent *se );