diff options
Diffstat (limited to 'sqlitebackend.h')
-rw-r--r-- | sqlitebackend.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sqlitebackend.h b/sqlitebackend.h index 8bfce00..0e7d339 100644 --- a/sqlitebackend.h +++ b/sqlitebackend.h @@ -19,6 +19,7 @@ public: Tag() : valid(false) {}
Tag(long long int id, QString name, qreal anchor_x, qreal anchor_y, QByteArray metadata);
Tag(long long int id, const Tag &other);
+ Tag(QString name, const QPointF &anchor, const QVariantMap metadata=QVariantMap());
bool isValid() { return valid; }
@@ -44,13 +45,17 @@ public: bool updateTag(Tag tag);
bool deleteTag(Tag tag);
bool createTag(Tag tag);
+ bool createTagAt(const QPointF &anchor);
+ QString getNextAutoTagName();
+
+ bool tagNameIsFree(const QString &name);
bool isMemory() { return m_memory; } /* backend db points to temporary memory db */
bool isDirty() { return m_dirty; } /* backend db was changed since opening */
bool isOpen() { return m_open; } /* backend db is open */
- bool setMeta(const QString &key, const QVariant &value);
- bool setMeta(std::initializer_list<QPair<QString, QVariant>> metas);
+ bool setMeta(const QString &key, const QVariant &value, bool setDirty=false);
+ bool setMeta(std::initializer_list<QPair<QString, QVariant>> metas, bool setDirty=false);
const QVariant getMeta(const QString &key) const;
const QString &errorString() const { return m_lastErrorString; }
@@ -87,6 +92,7 @@ signals: void tagChange(TagChange change, const Tag &tag);
void fileReload();
void fileIOError(Error e, QString errorName, QString description) const;
+ void imageLoaded(const QByteArray &image);
private:
bool connect();
|