summaryrefslogtreecommitdiff
path: root/tagscene.h
diff options
context:
space:
mode:
Diffstat (limited to 'tagscene.h')
-rw-r--r--tagscene.h30
1 files changed, 29 insertions, 1 deletions
diff --git a/tagscene.h b/tagscene.h
index 823609e..006fffd 100644
--- a/tagscene.h
+++ b/tagscene.h
@@ -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