00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef LINK_H
00023 #define LINK_H
00024
00025 #include <QGraphicsLineItem>
00026
00027 #ifndef DOXYGEN_IGNORE_THIS
00028
00029 class Node;
00030
00031 class Link : public QGraphicsLineItem
00032 {
00033 public:
00034 Link(Node *fromNode, QString fromProp, Node *toNode, QString toProp, QGraphicsItem * parent = 0, QGraphicsScene * scene = 0);
00035 ~Link();
00036
00037 Node *fromNode() const;
00038 Node *toNode() const;
00039 QString fromProp() const;
00040 QString toProp() const;
00041
00042 void changeFromPoint(Node *newNode, QString NewProp);
00043 void changeToPoint(Node *newNode, QString NewProp);
00044
00045 void setColor(const QColor &color);
00046 QColor color() const;
00047
00048 virtual void trackNodes();
00049
00050 protected:
00051 bool sceneEvent(QEvent * event);
00052
00053 Node *myFromNode;
00054 Node *myToNode;
00055 QString myFromProp;
00056 QString myToProp;
00057
00058 QGraphicsLineItem line2, line3, line4, line5;
00059 };
00060
00061 #endif
00062 #endif