diff options
author | jaseg <git-bigdata-wsl-arch@jaseg.de> | 2020-08-16 17:04:32 +0200 |
---|---|---|
committer | jaseg <git-bigdata-wsl-arch@jaseg.de> | 2020-08-16 17:04:32 +0200 |
commit | 2deadc6cfbf71e06908963fb1bae628cfe370f9d (patch) | |
tree | d737d2e1e9cfde305840179680610d015f5dbf0e /tagscene.h | |
parent | 752f270cf81bc8c88cb4bf428e5aceb51405c06a (diff) | |
download | numberator-2deadc6cfbf71e06908963fb1bae628cfe370f9d.tar.gz numberator-2deadc6cfbf71e06908963fb1bae628cfe370f9d.tar.bz2 numberator-2deadc6cfbf71e06908963fb1bae628cfe370f9d.zip |
Basic model/view action works
Diffstat (limited to 'tagscene.h')
-rw-r--r-- | tagscene.h | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -14,14 +14,18 @@ class TagScene : public QGraphicsScene Q_OBJECT public: - TagScene(SQLiteSaveFile &proj); + TagScene() {} + const QGraphicsPixmapItem *backgroundPixmapItem() const { return pix_it; } public slots: void reloadPicture(); - void reloadTags(); + void reloadScene(); + + void setProject(SQLiteSaveFile *proj); signals: void tagDoubleClicked(const Tag &tag); + void imageLoaded(); protected: void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override; @@ -32,9 +36,9 @@ private slots: private: void addTag(const Tag tag); - SQLiteSaveFile &proj; + SQLiteSaveFile *m_proj = nullptr; - QGraphicsPixmapItem *pix_it; + QGraphicsPixmapItem *pix_it = nullptr; QPixmap pix; QMap<long long int, TagItem*> tags; }; |