Changeset View
Changeset View
Standalone View
Standalone View
src/formatstrings.cpp
Show First 20 Lines • Show All 78 Lines • ▼ Show 20 Line(s) | 70 | { | |||
---|---|---|---|---|---|
79 | case 7: string = i18nc("Description of image orientation", "Transversed"); break; | 79 | case 7: string = i18nc("Description of image orientation", "Transversed"); break; | ||
80 | case 8: string = i18nc("Description of image orientation, counter clock-wise rotated", "270° rotated CCW"); break; | 80 | case 8: string = i18nc("Description of image orientation, counter clock-wise rotated", "270° rotated CCW"); break; | ||
81 | default: | 81 | default: | ||
82 | break; | 82 | break; | ||
83 | } | 83 | } | ||
84 | return string; | 84 | return string; | ||
85 | } | 85 | } | ||
86 | 86 | | |||
87 | QString FormatStrings::formatAsDegree(const QVariant& value) | ||||
88 | { | ||||
89 | return QString(QLocale().toString(value.toDouble()) + i18nc("Symbol of degree, no space", "°")); | ||||
90 | } | ||||
91 | | ||||
92 | QString FormatStrings::formatAsMeter(const QVariant& value) | ||||
93 | { | ||||
94 | KFormat form; | ||||
95 | return form.formatValue(value.toDouble(), KFormat::Unit::Meter, 1, KFormat::UnitPrefix::AutoAdjust, KFormat::MetricBinaryDialect); | ||||
96 | } | ||||
97 | | ||||
98 | QString FormatStrings::formatAsFrameRate(const QVariant& value) | ||||
99 | { | ||||
100 | return QString(value.toString() + i18nc("Symbol of frames per second, with space", " fps")); | ||||
101 | } | ||||
102 | | ||||
103 | |