author | simon <simon> | 2002-12-09 16:39:32 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-09 16:39:32 (UTC) |
commit | 1bb6aa52f2db85f65f75278310c328218caeae65 (patch) (side-by-side diff) | |
tree | 1983547bac0da80bde93554038a57713feb715c1 /noncore/multimedia/opieplayer2/videowidget.cpp | |
parent | 1ae041fba55e218a2523de441bec6ec3a1eecf02 (diff) | |
download | opie-1bb6aa52f2db85f65f75278310c328218caeae65.zip opie-1bb6aa52f2db85f65f75278310c328218caeae65.tar.gz opie-1bb6aa52f2db85f65f75278310c328218caeae65.tar.bz2 |
- removing duplicated code in VideoWidget
Diffstat (limited to 'noncore/multimedia/opieplayer2/videowidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index 12316f8..cc586cc 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp @@ -268,48 +268,25 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) { } else if ( !isOnButton && button.isHeld ) { button.isHeld = FALSE; toggleButton( button ); } } else { if ( button.isHeld ) { button.isHeld = FALSE; if ( button.type != ToggleButton ) { setToggleButton( button, FALSE ); } - switch( command ) { - - case Play: { - if( mediaPlayerState.isPaused() ) { - setToggleButton( button, FALSE ); - mediaPlayerState.setPaused( FALSE ); - return; - } else if( !mediaPlayerState.isPaused() ) { - setToggleButton( button, TRUE ); - mediaPlayerState.setPaused( TRUE ); - return; - } else { - return; - } - } - - case Stop: mediaPlayerState.setPlaying( FALSE ); return; - case Next: if( playList.currentTab() == PlayListWidget::CurrentPlayList ) mediaPlayerState.setNext(); return; - case Previous: if( playList.currentTab() == PlayListWidget::CurrentPlayList ) mediaPlayerState.setPrev(); return; - case VolumeUp: emit moreReleased(); return; - case VolumeDown: emit lessReleased(); return; - case FullScreen: mediaPlayerState.setFullscreen( TRUE ); makeVisible(); return; - default: break; - } + handleCommand( command, button.isDown ); } } } } void VideoWidget::mousePressEvent( QMouseEvent *event ) { mouseMoveEvent( event ); } void VideoWidget::mouseReleaseEvent( QMouseEvent *event ) { if ( mediaPlayerState.isFullscreen() ) { mediaPlayerState.setFullscreen( FALSE ); |