diff options
Diffstat (limited to 'tagscene.h')
-rw-r--r-- | tagscene.h | 30 |
1 files changed, 29 insertions, 1 deletions
@@ -1,14 +1,42 @@ #ifndef TAGSCENE_H #define TAGSCENE_H +#include "sqlitebackend.h" +#include "tagitem.h" + +#include <QGraphicsPixmapItem> #include <QGraphicsScene> class TagScene : public QGraphicsScene { + Q_OBJECT + public: - TagScene(); + TagScene(SQLiteSaveFile &proj); + +public slots: + void reloadPicture(); + void reloadTags(); + +signals: + void tagDoubleClicked(const Tag &tag); + +protected: + void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override; + +private slots: + void tagChanged(TagChange change, const Tag &tag); + +private: + void addTag(const Tag tag); + + SQLiteSaveFile &proj; + + QGraphicsPixmapItem *pix_it; + QPixmap pix; + QMap<long long int, TagItem*> tags; }; #endif // TAGSCENE_H |