ui: styled edges in graph view
This change styles the edges in the QtGraphView. They get drawn with vertical and horizontal parts and rounded corners.
This commit is contained in:
@@ -9,11 +9,6 @@ GraphEdge::~GraphEdge()
|
||||
{
|
||||
}
|
||||
|
||||
Id GraphEdge::getTokenId() const
|
||||
{
|
||||
return m_data->getId();
|
||||
}
|
||||
|
||||
const Edge* GraphEdge::getData() const
|
||||
{
|
||||
return m_data;
|
||||
|
||||
@@ -15,18 +15,14 @@ public:
|
||||
GraphEdge(const Edge* data);
|
||||
virtual ~GraphEdge();
|
||||
|
||||
virtual void ownerMoved() = 0;
|
||||
virtual void targetMoved() = 0;
|
||||
|
||||
virtual void removeEdgeFromScene() = 0;
|
||||
|
||||
virtual std::weak_ptr<GraphNode> getOwner() = 0;
|
||||
virtual std::weak_ptr<GraphNode> getTarget() = 0;
|
||||
|
||||
Id getTokenId() const;
|
||||
virtual void updateLine() = 0;
|
||||
|
||||
const Edge* getData() const;
|
||||
|
||||
protected:
|
||||
private:
|
||||
const Edge* m_data;
|
||||
};
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <memory>
|
||||
|
||||
#include "utility/math/Vector2.h"
|
||||
#include "utility/math/Vector4.h"
|
||||
#include "utility/types.h"
|
||||
|
||||
#include "data/graph/Node.h"
|
||||
@@ -28,12 +29,12 @@ public:
|
||||
virtual void setPosition(const Vec2i& position) = 0;
|
||||
|
||||
virtual Vec2i getSize() const = 0;
|
||||
virtual Vec4i getBoundingRect() const = 0;
|
||||
virtual Vec4i getParentBoundingRect() const = 0;
|
||||
|
||||
virtual bool addOutEdge(const std::shared_ptr<GraphEdge>& edge) = 0;
|
||||
virtual bool addInEdge(const std::weak_ptr<GraphEdge>& edge) = 0;
|
||||
|
||||
virtual void removeOutEdge(GraphEdge* edge) = 0;
|
||||
|
||||
virtual unsigned int getOutEdgeCount() const = 0;
|
||||
virtual unsigned int getInEdgeCount() const = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user