#ifndef TIKZSCENE_H #define TIKZSCENE_H #include "graph.h" #include "nodeitem.h" #include "edgeitem.h" #include #include #include #include #include #include #include class TikzScene : public QGraphicsScene { Q_OBJECT public: TikzScene(Graph *graph, QObject *parent); ~TikzScene(); Graph *graph() const; void setGraph(Graph *graph); public slots: void graphReplaced(); protected: void mousePressEvent(QGraphicsSceneMouseEvent *event); void mouseMoveEvent(QGraphicsSceneMouseEvent *event); void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); private: Graph *_graph; QVector nodeItems; QVector edgeItems; QHash *_oldNodePositions; }; #endif // TIKZSCENE_H