Inform of song change on play restart, add playlist auto sorting.

Fixes #511
This commit is contained in:
Jonas Kvinge
2020-10-01 19:58:16 +02:00
parent d09e2daf00
commit 872da05ff6
9 changed files with 60 additions and 23 deletions

View File

@@ -295,8 +295,10 @@ class Playlist : public QAbstractListModel {
void RateSong(const QModelIndex &idx, const double rating);
void RateSongs(const QModelIndexList &index_list, const double rating);
void set_auto_sort(const bool auto_sort) { auto_sort_ = auto_sort; }
public slots:
void set_current_row(const int i, const AutoScroll autoscroll = AutoScroll_Maybe, const bool is_stopping = false);
void set_current_row(const int i, const AutoScroll autoscroll = AutoScroll_Maybe, const bool is_stopping = false, const bool force_inform = false);
void Paused();
void Playing();
void Stopped();
@@ -430,6 +432,10 @@ class Playlist : public QAbstractListModel {
PlaylistGeneratorPtr dynamic_playlist_;
bool auto_sort_;
int sort_column_;
Qt::SortOrder sort_order_;
};
#endif // PLAYLIST_H