Playlist: add newly-added columns

Still mostly boilter-plate-y. It is somewhat interesting to see that info
in playlist view, so add the two fileds as columns.

At least for Integrated loudness, since it's normally negative,
we need to add a specialized Delegate.
This commit is contained in:
Roman Lebedev
2023-06-27 04:57:35 +03:00
committed by Jonas Kvinge
parent 44e5c32bcb
commit b2c66c9cda
5 changed files with 53 additions and 0 deletions

View File

@@ -274,6 +274,8 @@ void PlaylistView::SetItemDelegates() {
rating_delegate_ = new RatingItemDelegate(this);
setItemDelegateForColumn(Playlist::Column_Rating, rating_delegate_);
setItemDelegateForColumn(Playlist::Column_EBUR128IntegratedLoudness, new Ebur128LoudnessLUFSItemDelegate(this));
setItemDelegateForColumn(Playlist::Column_EBUR128LoudnessRange, new Ebur128LoudnessRangeLUItemDelegate(this));
}
void PlaylistView::setModel(QAbstractItemModel *m) {
@@ -391,6 +393,8 @@ void PlaylistView::RestoreHeaderState() {
header_->HideSection(Playlist::Column_Mood);
header_->HideSection(Playlist::Column_Rating);
header_->HideSection(Playlist::Column_HasCUE);
header_->HideSection(Playlist::Column_EBUR128IntegratedLoudness);
header_->HideSection(Playlist::Column_EBUR128LoudnessRange);
header_->moveSection(header_->visualIndex(Playlist::Column_Track), 0);