mirror of
https://github.com/nomic-ai/gpt4all
synced 2024-11-02 09:40:42 +00:00
30 lines
704 B
C++
30 lines
704 B
C++
#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
|