From dbe0046eb82c8ee61ce7fc704d3b376730abc17f Mon Sep 17 00:00:00 2001 From: simon Date: Mon, 09 Dec 2002 16:45:41 +0000 Subject: - yay, mouseMoveEvent is no more duplicated code :) --- (limited to 'noncore/multimedia/opieplayer2/videowidget.cpp') 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 ) { } } -void VideoWidget::mouseMoveEvent( QMouseEvent *event ) { - for ( ButtonVector::iterator it = buttons.begin(); it != buttons.end(); ++it ) { - Button &button = *it; - Command command = button.command; - - if ( event->state() == QMouseEvent::LeftButton ) { - // The test to see if the mouse click is inside the button or not - bool isOnButton = isOverButton( event->pos() - upperLeftOfButtonMask, command ); - - if ( isOnButton && !button.isHeld ) { - button.isHeld = TRUE; - toggleButton( button ); - - switch ( command ) { - case VolumeUp: - emit moreClicked(); - return; - case VolumeDown: - emit lessClicked(); - return; - default: break; - } - } else if ( !isOnButton && button.isHeld ) { - button.isHeld = FALSE; - toggleButton( button ); - } - } else { - - if ( button.isHeld ) { - button.isHeld = FALSE; - if ( button.type != ToggleButton ) { - setToggleButton( button, FALSE ); - } - - handleCommand( command, button.isDown ); - } - } - } -} - void VideoWidget::mousePressEvent( QMouseEvent *event ) { mouseMoveEvent( event ); } -- cgit v0.9.0.2