ui: typed edges
Edges in the graph view are now colored according to their type.
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user