diff options
author | jaseg <git-bigdata-wsl-arch@jaseg.de> | 2020-08-04 01:04:52 +0200 |
---|---|---|
committer | jaseg <git-bigdata-wsl-arch@jaseg.de> | 2020-08-04 01:04:52 +0200 |
commit | 872bb95acf6fabd639da57cd41a4844d7e6dd0f0 (patch) | |
tree | 689d8fd95b93e2b54111fd207e93f6789c4b7f28 /tagproptablemodel.h | |
download | numberator-872bb95acf6fabd639da57cd41a4844d7e6dd0f0.tar.gz numberator-872bb95acf6fabd639da57cd41a4844d7e6dd0f0.tar.bz2 numberator-872bb95acf6fabd639da57cd41a4844d7e6dd0f0.zip |
Initial commit
Diffstat (limited to 'tagproptablemodel.h')
-rw-r--r-- | tagproptablemodel.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/tagproptablemodel.h b/tagproptablemodel.h new file mode 100644 index 0000000..b127f90 --- /dev/null +++ b/tagproptablemodel.h @@ -0,0 +1,36 @@ +#ifndef TAGPROPTABLEMODEL_H
+#define TAGPROPTABLEMODEL_H
+
+#include "sqlitebackend.h"
+
+#include <qabstractitemmodel.h>
+
+
+
+class TagPropTableModel : public QAbstractTableModel
+{
+public:
+ TagPropTableModel(SQLiteSaveFile &backend);
+ TagPropTableModel(SQLiteSaveFile &backend, const Tag tag);
+
+ int rowCount(const QModelIndex &parent=QModelIndex()) const override;
+ int columnCount(const QModelIndex &parent=QModelIndex()) const override;
+ QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override;
+ QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override;
+
+ Qt::ItemFlags flags(const QModelIndex &index) const override;
+ bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override;
+
+ void showTag(const Tag &tag);
+
+private slots:
+ void tagChange(TagChange change, const Tag &tag);
+
+private:
+ SQLiteSaveFile &backend;
+ Tag tag_cached;
+ QStringList tag_keys;
+ bool tagIsValid;
+};
+
+#endif // TAGPROPTABLEMODEL_H
|