MCPcopy Create free account
hub / github.com/cpvrlab/ImagePlay / mouseMoveEvent

Method mouseMoveEvent

ImagePlay/src/IPProcessStep.cpp:513–554  ·  view source on GitHub ↗

! * \brief IPProcessStep::mouseMoveEvent * \param event */

Source from the content-addressed store, hash-verified

511 * \param event
512 */
513void IPProcessStep::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
514{
515 if(_connecting)
516 {
517 // update temporary arrow position
518 ((IPProcessGridScene*) scene())->setTmpArrowTo(event->scenePos());
519 ((IPProcessGridScene*) scene())->setTmpArrowVisible(true);
520 }
521
522
523 // notify the scene that the geometry has changed
524 //prepareGeometryChange();
525
526 // if colliding with other item, change cursor
527 bool groupIsColliding = false;
528 if(scene()->selectedItems().length() > 0)
529 {
530 for(int i=0; i < scene()->selectedItems().length(); i++)
531 {
532 IPProcessStep* item = (IPProcessStep*) scene()->selectedItems().at(i);
533 for(QGraphicsItem* currentItem : item->collidingItems())
534 {
535 IPProcessStep* step = dynamic_cast<IPProcessStep*>(currentItem);
536 if(step)
537 {
538 groupIsColliding = true;
539 break;
540 }
541 }
542 }
543 }
544 if(groupIsColliding)
545 {
546 setCursor(Qt::ForbiddenCursor);
547 }
548 else
549 {
550 setCursor(Qt::SizeAllCursor);
551 }
552
553 QGraphicsItem::mouseMoveEvent(event);
554}
555
556/*!
557 * \brief IPProcessStep::mouseDoubleClickEvent

Callers

nothing calls this directly

Calls 4

setTmpArrowToMethod · 0.80
setTmpArrowVisibleMethod · 0.80
lengthMethod · 0.80
atMethod · 0.45

Tested by

no test coverage detected