#ifndef TAGVIEW_H #define TAGVIEW_H #include "sqlitebackend.h" #include "tagscene.h" #include #include class TagView : public QGraphicsView { Q_OBJECT public: TagView(SQLiteSaveFile &proj); public slots: void zoomToFit(); void setZoom(qreal zoom); void zoomIn(qreal delta); void rotate(int angle); signals: void tagDoubleClicked(const Tag &tag); protected: void wheelEvent(QWheelEvent *evt) override; private slots: void saveCenter(); private: void restoreViewport(); TagScene scene; SQLiteSaveFile &proj; QTimer saveCenterTimer; int rotation; double zoom; }; #endif // TAGVIEW_H