Skip to content
This repository has been archived by the owner on Aug 17, 2021. It is now read-only.

Commit

Permalink
add: added a function helper
Browse files Browse the repository at this point in the history
  • Loading branch information
Qv2ray-dev authored and Qv2ray-dev committed May 18, 2020
1 parent db07dd4 commit f2592da
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/nodes/internal/FlowScene.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ namespace QtNodes
QSizeF getNodeSize(Node const &node) const;

public:
inline std::unique_ptr<Node> const &node(const QUuid &id) const
{
return nodes().at(id);
}
inline std::shared_ptr<Connection> const &connection(const QUuid &id) const
{
return connections().at(id);
}
std::unordered_map<QUuid, std::unique_ptr<Node>> const &nodes() const;
std::unordered_map<QUuid, std::shared_ptr<Connection>> const &connections() const;
std::vector<Node *> allNodes() const;
Expand Down

0 comments on commit f2592da

Please sign in to comment.