ui: typed edges

Edges in the graph view are now colored according to their type.
This commit is contained in:
Manuel Dobusch
2014-07-16 15:38:54 +02:00
parent 40ca86a172
commit 2c9c83d003
9 changed files with 94 additions and 49 deletions
@@ -3,8 +3,11 @@
#include <memory>
#include "utility/math/Vector4.h"
#include "utility/types.h"
#include "data/graph/Edge.h"
class GraphNode;
class GraphEdge
@@ -20,15 +23,19 @@ public:
virtual std::weak_ptr<GraphNode> getOwner() = 0;
virtual std::weak_ptr<GraphNode> getTarget() = 0;
virtual void setColor(const Vec4i& color) = 0;
virtual Vec4i getColor() const = 0;
};
// temporary data structure for (visual) graph creation process
struct DummyEdge
{
public:
DummyEdge(const Id o, const Id t)
DummyEdge(const Id o, const Id t, Edge::EdgeType type)
: ownerId(o)
, targetId(t)
, edgeType(type)
{
}
@@ -66,6 +73,8 @@ public:
Id ownerId;
Id targetId;
Edge::EdgeType edgeType;
};
#endif // GRAPH_EDGE_H