Begin implementing the localdocs ui in earnest.

This commit is contained in:
Adam Treat
2023-05-22 22:13:42 -04:00
committed by AT
parent 120fbbf67d
commit d555ed3b07
11 changed files with 1521 additions and 1114 deletions

View File

@@ -0,0 +1,29 @@
#ifndef LOCALDOCSMODEL_H
#define LOCALDOCSMODEL_H
#include <QAbstractListModel>
#include "database.h"
class LocalDocsModel : public QAbstractListModel
{
Q_OBJECT
public:
enum Roles {
CollectionRole = Qt::UserRole + 1,
FolderPathRole
};
explicit LocalDocsModel(QObject *parent = nullptr);
int rowCount(const QModelIndex & = QModelIndex()) const override;
QVariant data(const QModelIndex &index, int role) const override;
QHash<int, QByteArray> roleNames() const override;
public Q_SLOTS:
void handleCollectionListUpdated(const QList<CollectionItem> &collectionList);
private:
QList<CollectionItem> m_collectionList;
};
#endif // LOCALDOCSMODEL_H