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 -1
View File
@@ -5,6 +5,8 @@
#include "qgraphicsitem.h"
#include "utility/messaging/type/MessageActivateToken.h"
#include "component/view/graphElements/GraphEdge.h"
class GraphNode;
@@ -14,7 +16,7 @@ class QtGraphEdge:
public QGraphicsLineItem
{
public:
QtGraphEdge(const std::weak_ptr<GraphNode>& owner, const std::weak_ptr<GraphNode>& target);
QtGraphEdge(const std::weak_ptr<GraphNode>& owner, const std::weak_ptr<GraphNode>& target, const Id id);
virtual ~QtGraphEdge();
virtual void ownerMoved();
@@ -28,6 +30,8 @@ public:
virtual void setColor(const Vec4i& color);
virtual Vec4i getColor() const;
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event);
private:
std::weak_ptr<GraphNode> m_owner;
std::weak_ptr<GraphNode> m_target;