19#ifndef JELLYFIN_VIEWMODEL_PLAYLIST
20#define JELLYFIN_VIEWMODEL_PLAYLIST
24#include <QAbstractListModel>
28#include <QSharedPointer>
71 QVariant
data(
const QModelIndex &parent,
int role = Qt::DisplayRole)
const override;
72 int rowCount(
const QModelIndex &parent)
const override;
73 QHash<int, QByteArray>
roleNames()
const override;
78 void onBeforePlaylistCleared();
79 void onPlaylistCleared();
80 void onBeforeItemsAddedToList(
int startIndex,
int amount);
81 void onBeforeItemsAddedToQueue(
int startIndex,
int amount);
82 void onItemsAddedToList();
83 void onItemsAddedToQueue();
84 void onBeforeItemsRemovedFromList(
int startIndex,
int amount);
85 void onBeforeItemsRemovedFromQueue(
int startIndex,
int amount);
86 void onItemsRemovedFromList();
87 void onItemsRemovedFromQueue();
89 void onPlayingItemChanged();
93 int m_lastPlayedRow = -1;
99 bool isPlaying(
int index)
const;
Model of a playlist, a list of items that can be played.
Definition playlist.h:47
Indicator in which part of the playing queue a given item is positioned.
Definition playlist.h:41
Value
Definition playlist.h:44
@ NowPlaying
Definition playlist.h:46
@ Queue
Definition playlist.h:45
Playlist/queue that can be exposed to QML.
Definition playlist.h:54
int rowCount(const QModelIndex &parent) const override
Definition playlist.cpp:33
void setPlaylistModel(Model::Playlist *data)
Definition playlist.cpp:48
QHash< int, QByteArray > roleNames() const override
Definition playlist.cpp:37
friend class ItemUrlFetcherThread
Definition playlist.h:56
QVariant data(const QModelIndex &parent, int role=Qt::DisplayRole) const override
Definition playlist.cpp:83
RoleNames
Definition playlist.h:58
@ playing
Definition playlist.h:66
@ artists
Definition playlist.h:61
@ section
Definition playlist.h:67
@ name
Definition playlist.h:60
@ runTimeTicks
Definition playlist.h:63
@ artistItems
Definition playlist.h:62
Playlist(Model::Playlist *data, QObject *parent=nullptr)
Definition playlist.cpp:27