summaryrefslogtreecommitdiff
path: root/tagscene.h
diff options
context:
space:
mode:
authorjaseg <git-bigdata-wsl-arch@jaseg.de>2020-08-09 17:12:14 +0200
committerjaseg <git-bigdata-wsl-arch@jaseg.de>2020-08-09 17:12:14 +0200
commit0afe9ca6bf53da111e445d2aea7cfc94e7e3c601 (patch)
treedba69d8eb86e81a1a56a388eafa85817762cf87f /tagscene.h
parent872bb95acf6fabd639da57cd41a4844d7e6dd0f0 (diff)
downloadnumberator-0afe9ca6bf53da111e445d2aea7cfc94e7e3c601.tar.gz
numberator-0afe9ca6bf53da111e445d2aea7cfc94e7e3c601.tar.bz2
numberator-0afe9ca6bf53da111e445d2aea7cfc94e7e3c601.zip
db backend: mostly feature-complete
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