! * \brief IPProcessStep::snapToGrid */
| 324 | * \brief IPProcessStep::snapToGrid |
| 325 | */ |
| 326 | void IPProcessStep::snapToGrid() |
| 327 | { |
| 328 | int x = pos().x(); |
| 329 | int y = pos().y(); |
| 330 | |
| 331 | QPoint pos(x, y); |
| 332 | |
| 333 | // snapt to nearest grid position |
| 334 | QPointF newPos = (pos / 64)*64; |
| 335 | setPos(newPos); |
| 336 | |
| 337 | // update edges |
| 338 | foreach(IPProcessEdge* edge, _edgesIn) |
| 339 | { |
| 340 | edge->updatePosition(); |
| 341 | } |
| 342 | |
| 343 | foreach(IPProcessEdge* edge, _edgesOut) |
| 344 | { |
| 345 | edge->updatePosition(); |
| 346 | } |
| 347 | } |
| 348 | |
| 349 | void IPProcessStep::removeEdgeIn(IPProcessEdge *edge) |
| 350 | { |
no outgoing calls
no test coverage detected