ui: GraphView can set active tokenId on node clicked

By now the graph displays the active node, without neighbours or anything, and clicking a node sets the active token id to the clicked nodes id.

fortune cookie message = Be prepared to accept an exciting opportunity in the future.
This commit is contained in:
Manuel Dobusch
2014-07-07 16:53:44 +02:00
parent e38914887d
commit 0f60a9a556
14 changed files with 215 additions and 62 deletions
+3 -1
View File
@@ -3,6 +3,7 @@
#include "qgraphicsitem.h"
#include "utility/messaging/type/MessageActivateToken.h"
#include "utility/math/Vector2.h"
#include "component/view/graphElements/GraphNode.h"
@@ -14,9 +15,10 @@ class QtGraphNode:
public QGraphicsRectItem
{
public:
QtGraphNode(const Vec2i& position, const std::string& name);
QtGraphNode(const Vec2i& position, const std::string& name, const Id tokenId);
virtual ~QtGraphNode();
virtual std::string getName();
virtual Vec2i getPosition();
virtual void addOutEdge(const std::shared_ptr<GraphEdge>& edge);