Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: aa1bfc5c8a
Fetching contributors…

Cannot retrieve contributors at this time

41 lines (30 sloc) 0.559 kb
#include "_graphcore_h.h"
Edge::Edge(Graph* parent, Vertex* vertex1, Vertex* vertex2, QString edgeLabel): QObject(parent), edgeLabel(edgeLabel)
{
v1 = vertex1;
v2 = vertex2;
}
Edge::~Edge()
{
}
Vertex* Edge::vertex1() const
{
return v1;
}
Vertex* Edge::vertex2() const
{
return v2;
}
int Edge::index() const
{
return qobject_cast<Graph*>(parent())->getEdgeSet().indexOf(const_cast<Edge*>(this));
}
QString Edge::label() const
{
return edgeLabel;
}
void Edge::setLabel(QString newLabel)
{
edgeLabel = newLabel;
emit labelChanged(newLabel);
}
Jump to Line
Something went wrong with that request. Please try again.