Diffstat (limited to 'noncore/multimedia/opieplayer2/videowidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index cc586cc..41844e1 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp | |||
@@ -243,46 +243,6 @@ void VideoWidget::updateSlider( long i, long max ) { | |||
243 | } | 243 | } |
244 | } | 244 | } |
245 | 245 | ||
246 | void VideoWidget::mouseMoveEvent( QMouseEvent *event ) { | ||
247 | for ( ButtonVector::iterator it = buttons.begin(); it != buttons.end(); ++it ) { | ||
248 | Button &button = *it; | ||
249 | Command command = button.command; | ||
250 | |||
251 | if ( event->state() == QMouseEvent::LeftButton ) { | ||
252 | // The test to see if the mouse click is inside the button or not | ||
253 | bool isOnButton = isOverButton( event->pos() - upperLeftOfButtonMask, command ); | ||
254 | |||
255 | if ( isOnButton && !button.isHeld ) { | ||
256 | button.isHeld = TRUE; | ||
257 | toggleButton( button ); | ||
258 | |||
259 | switch ( command ) { | ||
260 | case VolumeUp: | ||
261 | emit moreClicked(); | ||
262 | return; | ||
263 | case VolumeDown: | ||
264 | emit lessClicked(); | ||
265 | return; | ||
266 | default: break; | ||
267 | } | ||
268 | } else if ( !isOnButton && button.isHeld ) { | ||
269 | button.isHeld = FALSE; | ||
270 | toggleButton( button ); | ||
271 | } | ||
272 | } else { | ||
273 | |||
274 | if ( button.isHeld ) { | ||
275 | button.isHeld = FALSE; | ||
276 | if ( button.type != ToggleButton ) { | ||
277 | setToggleButton( button, FALSE ); | ||
278 | } | ||
279 | |||
280 | handleCommand( command, button.isDown ); | ||
281 | } | ||
282 | } | ||
283 | } | ||
284 | } | ||
285 | |||
286 | void VideoWidget::mousePressEvent( QMouseEvent *event ) { | 246 | void VideoWidget::mousePressEvent( QMouseEvent *event ) { |
287 | mouseMoveEvent( event ); | 247 | mouseMoveEvent( event ); |
288 | } | 248 | } |