! * \brief IPProcessStep::mouseMoveEvent * \param event */
| 511 | * \param event |
| 512 | */ |
| 513 | void 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 |
nothing calls this directly
no test coverage detected