summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/videowidget.cpp
Unidiff
Diffstat (limited to 'noncore/multimedia/opieplayer2/videowidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp40
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
@@ -240,52 +240,12 @@ void VideoWidget::updateSlider( long i, long max ) {
240 if ( slider->maxValue() != width ) { 240 if ( slider->maxValue() != width ) {
241 slider->setMaxValue( width ); 241 slider->setMaxValue( width );
242 } 242 }
243 } 243 }
244} 244}
245 245
246void 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
286void VideoWidget::mousePressEvent( QMouseEvent *event ) { 246void VideoWidget::mousePressEvent( QMouseEvent *event ) {
287 mouseMoveEvent( event ); 247 mouseMoveEvent( event );
288} 248}
289 249
290void VideoWidget::mouseReleaseEvent( QMouseEvent *event ) { 250void VideoWidget::mouseReleaseEvent( QMouseEvent *event ) {
291 if ( mediaPlayerState.isFullscreen() ) { 251 if ( mediaPlayerState.isFullscreen() ) {