#ifndef TAGSCENE_H #define TAGSCENE_H #include "sqlitebackend.h" #include "tagitem.h" #include #include class TagScene : public QGraphicsScene { Q_OBJECT public: TagScene() {} const QGraphicsPixmapItem *backgroundPixmapItem() const { return pix_it; } public slots: void reloadPicture(); void reloadScene(); void setProject(SQLiteSaveFile *proj); signals: void tagDoubleClicked(const Tag &tag); void imageLoaded(); protected: void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override; private slots: void tagChanged(TagChange change, const Tag &tag); private: void addTag(const Tag tag); SQLiteSaveFile *m_proj = nullptr; QGraphicsPixmapItem *pix_it = nullptr; QPixmap pix; QMap tags; }; #endif // TAGSCENE_H