summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/videowidget.cpp107
1 files changed, 0 insertions, 107 deletions
diff --git a/core/multimedia/opieplayer/videowidget.cpp b/core/multimedia/opieplayer/videowidget.cpp
index 6ed0108..48104ca 100644
--- a/core/multimedia/opieplayer/videowidget.cpp
+++ b/core/multimedia/opieplayer/videowidget.cpp
@@ -310,11 +310,6 @@ void VideoWidget::paintButton( QPainter *p, int i ) {
310 { 310 {
311 p->drawPixmap( xoff, yoff, *buttonPixUp[i] ); 311 p->drawPixmap( xoff, yoff, *buttonPixUp[i] );
312 } 312 }
313// int x = videoButtons[i].xPos;
314// int y = videoButtons[i].yPos;
315// int offset = 10 + videoButtons[i].isDown;
316// p->drawPixmap( x, y, *pixmaps[videoButtons[i].isDown] );
317// p->drawPixmap( x + 1 + offset, y + offset, *pixmaps[2], 9 * videoButtons[i].controlType, 0, 9, 9 );
318} 313}
319 314
320 315
@@ -388,108 +383,6 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) {
388 } 383 }
389 } 384 }
390 } 385 }
391
392// for ( int i = 0; i < numVButtons; i++ )
393// {
394// if ( event->state() == QMouseEvent::LeftButton )
395// {
396// // The test to see if the mouse click is inside the button or not
397// int x = event->pos().x() - xoff;
398// int y = event->pos().y() - yoff;
399
400// bool isOnButton = ( x > 0 && y > 0 && x < imgButtonMask->width()
401// && y < imgButtonMask->height()
402// && imgButtonMask->pixelIndex( x, y ) == i + 1 );
403
404// if ( isOnButton && !videoButtons[i].isHeld )
405// {
406// qDebug("key %d", i);
407
408// videoButtons[i].isHeld = TRUE;
409// toggleButton(i);
410// switch (i) {
411// case VideoVolUp:
412// emit moreClicked();
413// return;
414// case VideoVolDown:
415// emit lessClicked();
416// return;
417// }
418// } else if ( !isOnButton && videoButtons[i].isHeld ) {
419// videoButtons[i].isHeld = FALSE;
420// toggleButton(i);
421// }
422
423
424// } else {
425
426// if ( videoButtons[i].isHeld )
427// {
428// videoButtons[i].isHeld = FALSE;
429// if ( !videoButtons[i].isToggle ) {
430// setToggleButton( i, FALSE );
431// }
432// qDebug("key %d", i);
433// switch(i) {
434// case VideoPlay:
435// {
436// if( mediaPlayerState->isPaused ) {
437// setToggleButton( i, FALSE );
438// mediaPlayerState->setPaused( FALSE );
439// return;
440// }
441// else if( !mediaPlayerState->isPaused ) {
442// setToggleButton( i, TRUE );
443// mediaPlayerState->setPaused( TRUE );
444// return;
445// } else {
446// return;
447// }
448// }
449
450// case VideoStop: mediaPlayerState->setPlaying(FALSE); return;
451// // case VideoPlay: mediaPlayerState->setPlaying(videoButtons[i].isDown); return;
452// // case VideoPause: mediaPlayerState->setPaused(videoButtons[i].isDown); return;
453// case VideoNext: mediaPlayerState->setNext(); return;
454// case VideoPrevious: mediaPlayerState->setPrev(); return;
455// case VideoVolUp: emit moreReleased(); return;
456// case VideoVolDown: emit lessReleased(); return;
457// // case VideoPlayList: mediaPlayerState->setList(); return;
458// case VideoFullscreen: mediaPlayerState->setFullscreen( TRUE ); makeVisible(); return;
459// }
460// }
461// }
462// }
463
464
465
466
467
468// for ( int i = 0; i < numButtons; i++ ) {
469// int x = videoButtons[i].xPos;
470// int y = videoButtons[i].yPos;
471// if ( event->state() == QMouseEvent::LeftButton ) {
472// // The test to see if the mouse click is inside the circular button or not
473// // (compared with the radius squared to avoid a square-root of our distance)
474// int radius = 16;
475// QPoint center = QPoint( x + radius, y + radius );
476// QPoint dXY = center - event->pos();
477// int dist = dXY.x() * dXY.x() + dXY.y() * dXY.y();
478// bool isOnButton = dist <= (radius * radius);
479// if ( isOnButton != videoButtons[i].isHeld ) {
480// videoButtons[i].isHeld = isOnButton;
481// toggleButton(i);
482// }
483// } else {
484// if ( videoButtons[i].isHeld ) {
485// videoButtons[i].isHeld = FALSE;
486// if ( !videoButtons[i].isToggle )
487// setToggleButton( i, FALSE );
488// }
489// }
490
491
492// }
493} 386}
494 387
495 388