ui: graph edges clickable
The graph views edges are now clickable. On click the edge and its connected nodes will be displayed. fortune cookie message = Be prepared to accept an exciting opportunity in the future.
This commit is contained in:
@@ -18,13 +18,18 @@ public:
|
||||
virtual std::string getNameForNodeWithId(Id id) const = 0;
|
||||
virtual std::vector<std::string> getNamesForNodesWithNamePrefix(const std::string& prefix) const = 0;
|
||||
virtual std::vector<Id> getIdsOfNeighbours(const Id id) const = 0;
|
||||
virtual std::vector<std::pair<Id, Id>> getNeighbourEdgesOfNode(const Id id) const = 0;
|
||||
virtual std::vector<std::pair<Id, Id>> getMemberEdgesOfNode(const Id id) const = 0;
|
||||
virtual std::vector<std::pair<Id, Id>> getUsageEdgesOfNode(const Id id) const = 0;
|
||||
virtual std::vector<std::pair<Id, Id>> getCallEdgesOfNode(const Id id) const = 0;
|
||||
virtual std::vector<std::pair<Id, Id>> getTypeOfEdgesOfNode(const Id id) const = 0;
|
||||
virtual std::vector<std::pair<Id, Id>> getReturnTypeOfEdgesOfNode(const Id id) const = 0;
|
||||
virtual std::vector<std::pair<Id, Id>> getParameterOfEdgesOfNode(const Id id) const = 0;
|
||||
virtual std::vector<std::tuple<Id, Id, Id>> getNeighbourEdgesOfNode(const Id id) const = 0;
|
||||
virtual std::vector<std::tuple<Id, Id, Id>> getMemberEdgesOfNode(const Id id) const = 0;
|
||||
virtual std::vector<std::tuple<Id, Id, Id>> getUsageEdgesOfNode(const Id id) const = 0;
|
||||
virtual std::vector<std::tuple<Id, Id, Id>> getCallEdgesOfNode(const Id id) const = 0;
|
||||
virtual std::vector<std::tuple<Id, Id, Id>> getTypeOfEdgesOfNode(const Id id) const = 0;
|
||||
virtual std::vector<std::tuple<Id, Id, Id>> getReturnTypeOfEdgesOfNode(const Id id) const = 0;
|
||||
virtual std::vector<std::tuple<Id, Id, Id>> getParameterOfEdgesOfNode(const Id id) const = 0;
|
||||
virtual std::vector<std::tuple<Id, Id, Id>> getInheritanceEdgesOfNode(const Id id) const = 0;
|
||||
|
||||
virtual std::pair<Id, Id> getNodesOfEdge(const Id id) const = 0;
|
||||
|
||||
virtual bool checkTokenIsNode(const Id id) const = 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -67,72 +67,102 @@ std::vector<Id> GraphAccessProxy::getIdsOfNeighbours(const Id id) const
|
||||
return std::vector<Id>();
|
||||
}
|
||||
|
||||
std::vector<std::pair<Id, Id>> GraphAccessProxy::getNeighbourEdgesOfNode(const Id id) const
|
||||
std::vector<std::tuple<Id, Id, Id>> GraphAccessProxy::getNeighbourEdgesOfNode(const Id id) const
|
||||
{
|
||||
if (hasSubject())
|
||||
{
|
||||
return m_subject->getNeighbourEdgesOfNode(id);
|
||||
}
|
||||
|
||||
return std::vector<std::pair<Id, Id>>();
|
||||
return std::vector<std::tuple<Id, Id, Id>>();
|
||||
}
|
||||
|
||||
std::vector<std::pair<Id, Id>> GraphAccessProxy::getMemberEdgesOfNode(const Id id) const
|
||||
std::vector<std::tuple<Id, Id, Id>> GraphAccessProxy::getMemberEdgesOfNode(const Id id) const
|
||||
{
|
||||
if (hasSubject())
|
||||
{
|
||||
return m_subject->getMemberEdgesOfNode(id);
|
||||
}
|
||||
|
||||
return std::vector<std::pair<Id, Id>>();
|
||||
return std::vector<std::tuple<Id, Id, Id>>();
|
||||
}
|
||||
|
||||
std::vector<std::pair<Id, Id>> GraphAccessProxy::getUsageEdgesOfNode(const Id id) const
|
||||
std::vector<std::tuple<Id, Id, Id>> GraphAccessProxy::getUsageEdgesOfNode(const Id id) const
|
||||
{
|
||||
if (hasSubject())
|
||||
{
|
||||
return m_subject->getUsageEdgesOfNode(id);
|
||||
}
|
||||
|
||||
return std::vector<std::pair<Id, Id>>();
|
||||
return std::vector<std::tuple<Id, Id, Id>>();
|
||||
}
|
||||
|
||||
std::vector<std::pair<Id, Id>> GraphAccessProxy::getCallEdgesOfNode(const Id id) const
|
||||
std::vector<std::tuple<Id, Id, Id>> GraphAccessProxy::getCallEdgesOfNode(const Id id) const
|
||||
{
|
||||
if (hasSubject())
|
||||
{
|
||||
return m_subject->getCallEdgesOfNode(id);
|
||||
}
|
||||
|
||||
return std::vector<std::pair<Id, Id>>();
|
||||
return std::vector<std::tuple<Id, Id, Id>>();
|
||||
}
|
||||
|
||||
std::vector<std::pair<Id, Id>> GraphAccessProxy::getTypeOfEdgesOfNode(const Id id) const
|
||||
std::vector<std::tuple<Id, Id, Id>> GraphAccessProxy::getTypeOfEdgesOfNode(const Id id) const
|
||||
{
|
||||
if (hasSubject())
|
||||
{
|
||||
return m_subject->getTypeOfEdgesOfNode(id);
|
||||
}
|
||||
|
||||
return std::vector<std::pair<Id, Id>>();
|
||||
return std::vector<std::tuple<Id, Id, Id>>();
|
||||
}
|
||||
|
||||
std::vector<std::pair<Id, Id>> GraphAccessProxy::getReturnTypeOfEdgesOfNode(const Id id) const
|
||||
std::vector<std::tuple<Id, Id, Id>> GraphAccessProxy::getReturnTypeOfEdgesOfNode(const Id id) const
|
||||
{
|
||||
if (hasSubject())
|
||||
{
|
||||
return m_subject->getReturnTypeOfEdgesOfNode(id);
|
||||
}
|
||||
|
||||
return std::vector<std::pair<Id, Id>>();
|
||||
return std::vector<std::tuple<Id, Id, Id>>();
|
||||
}
|
||||
|
||||
std::vector<std::pair<Id, Id>> GraphAccessProxy::getParameterOfEdgesOfNode(const Id id) const
|
||||
std::vector<std::tuple<Id, Id, Id>> GraphAccessProxy::getParameterOfEdgesOfNode(const Id id) const
|
||||
{
|
||||
if (hasSubject())
|
||||
{
|
||||
return m_subject->getParameterOfEdgesOfNode(id);
|
||||
}
|
||||
|
||||
return std::vector<std::pair<Id, Id>>();
|
||||
return std::vector<std::tuple<Id, Id, Id>>();
|
||||
}
|
||||
|
||||
std::vector<std::tuple<Id, Id, Id>> GraphAccessProxy::getInheritanceEdgesOfNode(const Id id) const
|
||||
{
|
||||
if (hasSubject())
|
||||
{
|
||||
return m_subject->getInheritanceEdgesOfNode(id);
|
||||
}
|
||||
|
||||
return std::vector<std::tuple<Id, Id, Id>>();
|
||||
}
|
||||
|
||||
std::pair<Id, Id> GraphAccessProxy::getNodesOfEdge(const Id id) const
|
||||
{
|
||||
if (hasSubject())
|
||||
{
|
||||
return m_subject->getNodesOfEdge(id);
|
||||
}
|
||||
|
||||
return std::pair<Id, Id>();
|
||||
}
|
||||
|
||||
bool GraphAccessProxy::checkTokenIsNode(const Id id) const
|
||||
{
|
||||
if (hasSubject())
|
||||
{
|
||||
return m_subject->checkTokenIsNode(id);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -17,13 +17,18 @@ public:
|
||||
virtual std::string getNameForNodeWithId(Id id) const;
|
||||
virtual std::vector<std::string> getNamesForNodesWithNamePrefix(const std::string& prefix) const;
|
||||
virtual std::vector<Id> getIdsOfNeighbours(const Id id) const;
|
||||
virtual std::vector<std::pair<Id, Id>> getNeighbourEdgesOfNode(const Id id) const;
|
||||
virtual std::vector<std::pair<Id, Id>> getMemberEdgesOfNode(const Id id) const;
|
||||
virtual std::vector<std::pair<Id, Id>> getUsageEdgesOfNode(const Id id) const;
|
||||
virtual std::vector<std::pair<Id, Id>> getCallEdgesOfNode(const Id id) const;
|
||||
virtual std::vector<std::pair<Id, Id>> getTypeOfEdgesOfNode(const Id id) const;
|
||||
virtual std::vector<std::pair<Id, Id>> getReturnTypeOfEdgesOfNode(const Id id) const;
|
||||
virtual std::vector<std::pair<Id, Id>> getParameterOfEdgesOfNode(const Id id) const;
|
||||
virtual std::vector<std::tuple<Id, Id, Id>> getNeighbourEdgesOfNode(const Id id) const;
|
||||
virtual std::vector<std::tuple<Id, Id, Id>> getMemberEdgesOfNode(const Id id) const;
|
||||
virtual std::vector<std::tuple<Id, Id, Id>> getUsageEdgesOfNode(const Id id) const;
|
||||
virtual std::vector<std::tuple<Id, Id, Id>> getCallEdgesOfNode(const Id id) const;
|
||||
virtual std::vector<std::tuple<Id, Id, Id>> getTypeOfEdgesOfNode(const Id id) const;
|
||||
virtual std::vector<std::tuple<Id, Id, Id>> getReturnTypeOfEdgesOfNode(const Id id) const;
|
||||
virtual std::vector<std::tuple<Id, Id, Id>> getParameterOfEdgesOfNode(const Id id) const;
|
||||
virtual std::vector<std::tuple<Id, Id, Id>> getInheritanceEdgesOfNode(const Id id) const;
|
||||
|
||||
virtual std::pair<Id, Id> getNodesOfEdge(const Id id) const;
|
||||
|
||||
virtual bool checkTokenIsNode(const Id id) const;
|
||||
|
||||
private:
|
||||
GraphAccess* m_subject;
|
||||
|
||||
Reference in New Issue
Block a user