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 setColor(const QColor &color);
00043 QColor color() const;
00044
00045 virtual void trackNodes();
00046
00047 protected:
00048 Node *myFromNode;
00049 Node *myToNode;
00050 QString myFromProp;
00051 QString myToProp;
00052 };
00053
00054 #endif
00055 #endif