1 #ifndef MUSICPLAYLIST_H
2 #define MUSICPLAYLIST_H
39 : m_playlistRow(index),
47 return m_playlistRow != -1 && !m_path.isEmpty();
52 return m_playlistRow == other.m_playlistRow && m_path == other.m_path;
75 void setShuffleMode(
bool shuffle) noexcept;
89 int currentIndex()
const noexcept;
98 const MusicPlayItemList& mediaList()
const noexcept;
102 const MusicPlayItemList& queueList()
const noexcept;
107 int count()
const noexcept;
111 bool isEmpty()
const noexcept;
120 void update(
const TTK::IndexPropertyList &rows);
129 int find(
int playlistRow,
const QString &content,
int from = 0);
134 void add(
int playlistRow,
const QString &content);
138 void add(
int playlistRow,
const QStringList &items);
143 void append(
int playlistRow,
const QString &content);
147 void append(
int playlistRow,
const QStringList &items);
151 void appendQueue(
int playlistRow,
const QString &content);
156 bool remove(
int index);
160 int remove(
int playlistRow,
const QString &content);
164 void removeQueue() noexcept;
170 void currentIndexChanged(
int index);
180 void setCurrentIndex(
int index);
184 void setCurrentIndex(
int playlistRow,
const QString &path);
203 void setEnabled(
bool enable) noexcept;
207 bool isEnabled()
const noexcept;
211 void initialize(
const MusicPlayItemList &items) noexcept;
230 #endif // MUSICPLAYLIST_H
The class of the music play item.
#define TTK_MODULE_EXPORT
bool operator==(const TTKOptional< T > &v, const T &other)
MusicPlayItemList m_queueList
static constexpr int PLAY_PREVIOUS_LEVEL
MusicPlayItemList m_mediaList
TTK_MODULE_EXPORT void initialize(TTK::Attribute attr)
static constexpr int PLAY_NEXT_LEVEL
TTK::PlayMode m_playbackMode
MusicPlayItem(int index, const QString &path) noexcept
bool isValid() const noexcept
The class of the music play list.
TTK_DECLARE_LIST(MusicPlayItem)