summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/mediawidget.cpp
Unidiff
Diffstat (limited to 'noncore/multimedia/opieplayer2/mediawidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/mediawidget.cpp b/noncore/multimedia/opieplayer2/mediawidget.cpp
index c0ebd63..7eb75e6 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.cpp
+++ b/noncore/multimedia/opieplayer2/mediawidget.cpp
@@ -60,37 +60,42 @@ void MediaWidget::paintEvent( QPaintEvent *pe )
60 QPainter p( &pix ); 60 QPainter p( &pix );
61 p.translate( -pe->rect().topLeft().x(), -pe->rect().topLeft().y() ); 61 p.translate( -pe->rect().topLeft().x(), -pe->rect().topLeft().y() );
62 p.drawTiledPixmap( pe->rect(), backgroundPixmap, pe->rect().topLeft() ); 62 p.drawTiledPixmap( pe->rect(), backgroundPixmap, pe->rect().topLeft() );
63 paintAllButtons( p ); 63 paintAllButtons( p );
64 QPainter p2( this ); 64 QPainter p2( this );
65 p2.drawPixmap( pe->rect().topLeft(), pix ); 65 p2.drawPixmap( pe->rect().topLeft(), pix );
66 } else { 66 } else {
67 QPainter p( this ); 67 QPainter p( this );
68 paintAllButtons( p ); 68 paintAllButtons( p );
69 } 69 }
70} 70}
71 71
72void MediaWidget::makeVisible()
73{
74}
75
72void MediaWidget::handleCommand( Command command, bool buttonDown ) 76void MediaWidget::handleCommand( Command command, bool buttonDown )
73{ 77{
74 switch ( command ) { 78 switch ( command ) {
75 case Play: mediaPlayerState.togglePaused(); 79 case Play: mediaPlayerState.togglePaused();
76 case Stop: mediaPlayerState.setPlaying(FALSE); return; 80 case Stop: mediaPlayerState.setPlaying(FALSE); return;
77 case Next: if( playList.currentTab() == PlayListWidget::CurrentPlayList ) mediaPlayerState.setNext(); return; 81 case Next: if( playList.currentTab() == PlayListWidget::CurrentPlayList ) mediaPlayerState.setNext(); return;
78 case Previous: if( playList.currentTab() == PlayListWidget::CurrentPlayList ) mediaPlayerState.setPrev(); return; 82 case Previous: if( playList.currentTab() == PlayListWidget::CurrentPlayList ) mediaPlayerState.setPrev(); return;
79 case Loop: mediaPlayerState.setLooping( buttonDown ); return; 83 case Loop: mediaPlayerState.setLooping( buttonDown ); return;
80 case VolumeUp: emit moreReleased(); return; 84 case VolumeUp: emit moreReleased(); return;
81 case VolumeDown: emit lessReleased(); return; 85 case VolumeDown: emit lessReleased(); return;
82 case PlayList: mediaPlayerState.setList(); return; 86 case PlayList: mediaPlayerState.setList(); return;
83 case Forward: emit forwardReleased(); return; 87 case Forward: emit forwardReleased(); return;
84 case Back: emit backReleased(); return; 88 case Back: emit backReleased(); return;
89 case FullScreen: mediaPlayerState.setFullscreen( true ); makeVisible(); return;
85 default: assert( false ); 90 default: assert( false );
86 } 91 }
87} 92}
88 93
89bool MediaWidget::isOverButton( const QPoint &position, int buttonId ) const 94bool MediaWidget::isOverButton( const QPoint &position, int buttonId ) const
90{ 95{
91 return ( position.x() > 0 && position.y() > 0 && 96 return ( position.x() > 0 && position.y() > 0 &&
92 position.x() < buttonMask.width() && 97 position.x() < buttonMask.width() &&
93 position.y() < buttonMask.height() && 98 position.y() < buttonMask.height() &&
94 buttonMask.pixelIndex( position.x(), position.y() ) == buttonId + 1 ); 99 buttonMask.pixelIndex( position.x(), position.y() ) == buttonId + 1 );
95} 100}
96 101