aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General/library/librarymodel.h
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2021-01-02 18:30:38 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2021-01-02 18:30:38 +0000
commit7596bcb971e27330e089a7067b024e476b2ce15e (patch)
tree5cf9ad0c2b43a1515e65dbc97742aa5c00dac873 /src/plugins/General/library/librarymodel.h
parentbc85b9be80c7705d646a61667f9a3f4b3a8fd4fc (diff)
downloadqmmp-7596bcb971e27330e089a7067b024e476b2ce15e.tar.gz
qmmp-7596bcb971e27330e089a7067b024e476b2ce15e.tar.bz2
qmmp-7596bcb971e27330e089a7067b024e476b2ce15e.zip
library: added tree model
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9613 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/library/librarymodel.h')
-rw-r--r--src/plugins/General/library/librarymodel.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/plugins/General/library/librarymodel.h b/src/plugins/General/library/librarymodel.h
index 492b61e56..a13081bdd 100644
--- a/src/plugins/General/library/librarymodel.h
+++ b/src/plugins/General/library/librarymodel.h
@@ -25,19 +25,29 @@
#include <QStringList>
#include <QAbstractItemModel>
+class QSqlDatabase;
+class LibraryTreeItem;
+
class LibraryModel : public QAbstractItemModel
{
Q_OBJECT
public:
LibraryModel(QObject *parent = nullptr);
+ ~LibraryModel();
+ bool canFetchMore(const QModelIndex &parent) const override;
+ void fetchMore(const QModelIndex &parent) override;
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
+ QModelIndex parent(const QModelIndex &child) const override;
+ QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
void refresh();
private:
- QStringList m_artists;
+ LibraryTreeItem *m_rootItem;
+
};
#endif // LIBRARYMODEL_H