#ifndef NODE_H #define NODE_H #include #include "edge.h" #include "graphwidget.h" class GraphWidget; class Node : public QGraphicsTextItem { public: Node(GraphWidget *graphWidget = 0); void addEdge(Edge *edge); QList edges() const; protected: QVariant itemChange(GraphicsItemChange change, const QVariant &value); void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); private: QList m_edgeList; GraphWidget *m_graph; }; #endif // NODE_H