summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/mediawidget.cpp b/noncore/multimedia/opieplayer2/mediawidget.cpp
index 1d18d6f..ca84019 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.cpp
+++ b/noncore/multimedia/opieplayer2/mediawidget.cpp
@@ -39,34 +39,40 @@ MediaWidget::~MediaWidget()
39{ 39{
40} 40}
41 41
42void MediaWidget::closeEvent( QCloseEvent * ) 42void MediaWidget::closeEvent( QCloseEvent * )
43{ 43{
44 mediaPlayerState.setList(); 44 mediaPlayerState.setList();
45} 45}
46 46
47void MediaWidget::handleCommand( Command command, bool buttonDown ) 47void MediaWidget::handleCommand( Command command, bool buttonDown )
48{ 48{
49 switch ( command ) { 49 switch ( command ) {
50 case Play: mediaPlayerState.togglePaused(); 50 case Play: mediaPlayerState.togglePaused();
51 case Stop: mediaPlayerState.setPlaying(FALSE); return; 51 case Stop: mediaPlayerState.setPlaying(FALSE); return;
52 case Next: if( playList.currentTab() == PlayListWidget::CurrentPlayList ) mediaPlayerState.setNext(); return; 52 case Next: if( playList.currentTab() == PlayListWidget::CurrentPlayList ) mediaPlayerState.setNext(); return;
53 case Previous: if( playList.currentTab() == PlayListWidget::CurrentPlayList ) mediaPlayerState.setPrev(); return; 53 case Previous: if( playList.currentTab() == PlayListWidget::CurrentPlayList ) mediaPlayerState.setPrev(); return;
54 case Loop: mediaPlayerState.setLooping( buttonDown ); return; 54 case Loop: mediaPlayerState.setLooping( buttonDown ); return;
55 case VolumeUp: emit moreReleased(); return; 55 case VolumeUp: emit moreReleased(); return;
56 case VolumeDown: emit lessReleased(); return; 56 case VolumeDown: emit lessReleased(); return;
57 case PlayList: mediaPlayerState.setList(); return; 57 case PlayList: mediaPlayerState.setList(); return;
58 case Forward: emit forwardReleased(); return; 58 case Forward: emit forwardReleased(); return;
59 case Back: emit backReleased(); return; 59 case Back: emit backReleased(); return;
60 } 60 }
61} 61}
62 62
63bool MediaWidget::isOverButton( const QPoint &position, int buttonId ) const 63bool MediaWidget::isOverButton( const QPoint &position, int buttonId ) const
64{ 64{
65 return ( position.x() > 0 && position.y() > 0 && 65 return ( position.x() > 0 && position.y() > 0 &&
66 position.x() < buttonMask.width() && 66 position.x() < buttonMask.width() &&
67 position.y() < buttonMask.height() && 67 position.y() < buttonMask.height() &&
68 buttonMask.pixelIndex( position.x(), position.y() ) == buttonId + 1 ); 68 buttonMask.pixelIndex( position.x(), position.y() ) == buttonId + 1 );
69} 69}
70 70
71void MediaWidget::repaintButton( int buttonId )
72{
73 QPainter p( this );
74 paintButton( p, buttonId );
75}
76
71/* vim: et sw=4 ts=4 77/* vim: et sw=4 ts=4
72 */ 78 */