diff options
Diffstat (limited to 'src/qml/qmllibrarytracklistmodel.h')
-rw-r--r-- | src/qml/qmllibrarytracklistmodel.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/qml/qmllibrarytracklistmodel.h b/src/qml/qmllibrarytracklistmodel.h new file mode 100644 index 0000000000..9bf4870fa1 --- /dev/null +++ b/src/qml/qmllibrarytracklistmodel.h @@ -0,0 +1,33 @@ +#pragma once +#include <QIdentityProxyModel> + +class LibraryTableModel; + +namespace mixxx { +namespace skin { +namespace qml { + +class QmlLibraryTrackListModel : public QIdentityProxyModel { + public: + enum Roles { + TitleRole = Qt::UserRole, + ArtistRole, + AlbumRole, + AlbumArtistRole, + FileUrlRole, + }; + Q_ENUM(Roles); + + QmlLibraryTrackListModel(LibraryTableModel* pModel, QObject* pParent = nullptr); + ~QmlLibraryTrackListModel() = default; + + QVariant data(const QModelIndex& index, int role) const override; + int columnCount(const QModelIndex& index = QModelIndex()) const override; + QHash<int, QByteArray> roleNames() const override; +}; + +} // namespace qml +} // namespace skin +} // namespace mixxx + +Q_DECLARE_METATYPE(mixxx::skin::qml::QmlLibraryTrackListModel*) |