Basic model/view action works
This commit is contained in:
parent
752f270cf8
commit
2deadc6cfb
15 changed files with 439 additions and 133 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue