MCPcopy Create free account
hub / github.com/BehaviorTree/Groot / selectedNodes

Method selectedNodes

QtNodeEditor/src/FlowScene.cpp:432–452  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

430
431
432std::vector<Node*>
433FlowScene::
434selectedNodes() 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//------------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 1

nodeMethod · 0.80

Tested by

no test coverage detected