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

@@ -540,3 +540,23 @@ QString RatingItemDelegate::displayText(const QVariant &value, const QLocale&) c
return QString::number(rating, 'f', 1);
}
QString Ebur128LoudnessLUFSItemDelegate::displayText(const QVariant &value, const QLocale&) const {
bool ok = false;
double v = value.toDouble(&ok);
if (ok) return Song::Ebur128LoudnessLUFSToText(v);
return QString();
}
QString Ebur128LoudnessRangeLUItemDelegate::displayText(const QVariant &value, const QLocale&) const {
bool ok = false;
double v = value.toDouble(&ok);
if (ok) return Song::Ebur128LoudnessRangeLUToText(v);
return QString();
}