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:
Manuel Dobusch
2014-07-17 12:19:28 +02:00
parent 2c9c83d003
commit 7157f0d127
11 changed files with 228 additions and 88 deletions
@@ -5,8 +5,9 @@
#include "component/view/graphElements/GraphNode.h"
QtGraphEdge::QtGraphEdge(const std::weak_ptr<GraphNode>& owner, const std::weak_ptr<GraphNode>& target)
: m_owner(owner)
QtGraphEdge::QtGraphEdge(const std::weak_ptr<GraphNode>& owner, const std::weak_ptr<GraphNode>& target, const Id id)
: GraphEdge(id)
, m_owner(owner)
, m_target(target)
, m_color(0, 0, 0, 0)
{
@@ -99,3 +100,9 @@ Vec4i QtGraphEdge::getColor() const
{
return m_color;
}
void QtGraphEdge::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event)
{
MessageActivateToken message(m_tokenId);
message.dispatch();
}