| 430 | |
| 431 | |
| 432 | std::vector<Node*> |
| 433 | FlowScene:: |
| 434 | selectedNodes() const |
| 435 | { |
| 436 | QList<QGraphicsItem*> graphicsItems = selectedItems(); |
| 437 | |
| 438 | std::vector<Node*> ret; |
| 439 | ret.reserve(graphicsItems.size()); |
| 440 | |
| 441 | for (QGraphicsItem* item : graphicsItems) |
| 442 | { |
| 443 | auto ngo = qgraphicsitem_cast<NodeGraphicsObject*>(item); |
| 444 | |
| 445 | if (ngo != nullptr) |
| 446 | { |
| 447 | ret.push_back(&ngo->node()); |
| 448 | } |
| 449 | } |
| 450 | |
| 451 | return ret; |
| 452 | } |
| 453 | |
| 454 | |
| 455 | //------------------------------------------------------------------------------ |