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;
76 void setShuffleMode(
bool shuffle) noexcept;
90 int currentIndex()
const noexcept;
98 QString currentMediaPath()
const;
102 bool isSameMediaPath(
const QString &path)
const;
107 const MusicPlayItemList& mediaList()
const noexcept;
111 const MusicPlayItemList& queueList()
const noexcept;
116 int count()
const noexcept;
120 bool isEmpty()
const noexcept;
129 void update(
const TTK::IndexPropertyList &indexs);
138 int find(
int playlistRow,
const QString &content,
int from = 0);
143 void add(
int playlistRow,
const QString &content);
147 void add(
int playlistRow,
const QStringList &items);
152 void append(
int playlistRow,
const QString &content);
156 void append(
int playlistRow,
const QStringList &items);
160 void appendQueue(
int playlistRow,
const QString &content);
165 bool remove(
int pos);
169 int remove(
int playlistRow,
const QString &content);
173 void removeQueue() noexcept;
179 void currentIndexChanged(
int index);
189 void setCurrentIndex(
int index);
193 void setCurrentIndex(
int playlistRow,
const QString &path);
212 void setEnabled(
bool enable) noexcept;
216 bool isEnabled()
const noexcept;
220 void initialize(
const MusicPlayItemList &items) noexcept;
239 #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
#define TTK_DECLARE_MODULE(Class)
MusicPlayItemList m_mediaList
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)