You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
521 B
36 lines
521 B
#ifndef EDGE_H
|
|
#define EDGE_H
|
|
|
|
#include <QGraphicsItem>
|
|
|
|
class Node;
|
|
|
|
class Edge : public QGraphicsItem
|
|
{
|
|
public:
|
|
|
|
Edge(Node *sourceNode, Node *destNode);
|
|
|
|
Node *sourceNode() const;
|
|
Node *destNode() const;
|
|
|
|
void adjust();
|
|
|
|
protected:
|
|
|
|
QRectF boundingRect() const;
|
|
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
|
|
|
private:
|
|
|
|
Node *m_sourceNode;
|
|
Node *m_destNode;
|
|
|
|
QPointF m_sourcePoint;
|
|
QPointF m_destPoint;
|
|
qreal m_arrowSize;
|
|
|
|
};
|
|
|
|
#endif
|