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:
committed by
Jonas Kvinge
parent
44e5c32bcb
commit
b2c66c9cda
@@ -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();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user