#ifndef TAGSCENE_H #define TAGSCENE_H #include "sqlitebackend.h" #include "tagitem.h" #include #include class TagScene : public QGraphicsScene { Q_OBJECT public: TagScene() {} ~TagScene() { this->blockSignals(true); } const QGraphicsPixmapItem *backgroundPixmapItem() const { return pix_it; } public slots: void reloadPicture(); void reloadScene(); void selectTag(const Tag &tag); 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