author | simon <simon> | 2002-12-09 16:39:32 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-09 16:39:32 (UTC) |
commit | 1bb6aa52f2db85f65f75278310c328218caeae65 (patch) (unidiff) | |
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 ) { | |||
268 | } else if ( !isOnButton && button.isHeld ) { | 268 | } else if ( !isOnButton && button.isHeld ) { |
269 | button.isHeld = FALSE; | 269 | button.isHeld = FALSE; |
270 | toggleButton( button ); | 270 | toggleButton( button ); |
271 | } | 271 | } |
272 | } else { | 272 | } else { |
273 | 273 | ||
274 | if ( button.isHeld ) { | 274 | if ( button.isHeld ) { |
275 | button.isHeld = FALSE; | 275 | button.isHeld = FALSE; |
276 | if ( button.type != ToggleButton ) { | 276 | if ( button.type != ToggleButton ) { |
277 | setToggleButton( button, FALSE ); | 277 | setToggleButton( button, FALSE ); |
278 | } | 278 | } |
279 | 279 | ||
280 | switch( command ) { | 280 | handleCommand( command, button.isDown ); |
281 | |||
282 | case Play: { | ||
283 | if( mediaPlayerState.isPaused() ) { | ||
284 | setToggleButton( button, FALSE ); | ||
285 | mediaPlayerState.setPaused( FALSE ); | ||
286 | return; | ||
287 | } else if( !mediaPlayerState.isPaused() ) { | ||
288 | setToggleButton( button, TRUE ); | ||
289 | mediaPlayerState.setPaused( TRUE ); | ||
290 | return; | ||
291 | } else { | ||
292 | return; | ||
293 | } | ||
294 | } | ||
295 | |||
296 | case Stop: mediaPlayerState.setPlaying( FALSE ); return; | ||
297 | case Next: if( playList.currentTab() == PlayListWidget::CurrentPlayList ) mediaPlayerState.setNext(); return; | ||
298 | case Previous: if( playList.currentTab() == PlayListWidget::CurrentPlayList ) mediaPlayerState.setPrev(); return; | ||
299 | case VolumeUp: emit moreReleased(); return; | ||
300 | case VolumeDown: emit lessReleased(); return; | ||
301 | case FullScreen: mediaPlayerState.setFullscreen( TRUE ); makeVisible(); return; | ||
302 | default: break; | ||
303 | } | ||
304 | } | 281 | } |
305 | } | 282 | } |
306 | } | 283 | } |
307 | } | 284 | } |
308 | 285 | ||
309 | void VideoWidget::mousePressEvent( QMouseEvent *event ) { | 286 | void VideoWidget::mousePressEvent( QMouseEvent *event ) { |
310 | mouseMoveEvent( event ); | 287 | mouseMoveEvent( event ); |
311 | } | 288 | } |
312 | 289 | ||
313 | void VideoWidget::mouseReleaseEvent( QMouseEvent *event ) { | 290 | void VideoWidget::mouseReleaseEvent( QMouseEvent *event ) { |
314 | if ( mediaPlayerState.isFullscreen() ) { | 291 | if ( mediaPlayerState.isFullscreen() ) { |
315 | mediaPlayerState.setFullscreen( FALSE ); | 292 | mediaPlayerState.setFullscreen( FALSE ); |