#ifndef GRAPHWIDGET_H #define GRAPHWIDGET_H #include #include #include #include "node.h" class GraphWidget : public QGraphicsView { Q_OBJECT public: GraphWidget(QWidget *parent = 0); QGraphicsScene *getScene(); protected: void keyPressEvent(QKeyEvent *event); void wheelEvent(QWheelEvent *event); void scaleView(qreal scaleFactor); void drawBackground(QPainter *painter, const QRectF &rect); private: Node *activeNode; QGraphicsScene *scene; }; #endif // GRAPHWIDGET_H