Changeset View
Changeset View
Standalone View
Standalone View
src/lib/util/kformat.cpp
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Line(s) | |||||
47 | QString KFormat::formatByteSize(double size, | 47 | QString KFormat::formatByteSize(double size, | ||
48 | int precision, | 48 | int precision, | ||
49 | KFormat::BinaryUnitDialect dialect, | 49 | KFormat::BinaryUnitDialect dialect, | ||
50 | KFormat::BinarySizeUnits units) const | 50 | KFormat::BinarySizeUnits units) const | ||
51 | { | 51 | { | ||
52 | return d->formatByteSize(size, precision, dialect, units); | 52 | return d->formatByteSize(size, precision, dialect, units); | ||
53 | } | 53 | } | ||
54 | 54 | | |||
55 | QString KFormat::formatValue(double value, | ||||
56 | KFormat::Unit unit, | ||||
57 | int precision, | ||||
58 | KFormat::UnitPrefix prefix, | ||||
59 | KFormat::BinaryUnitDialect dialect) const | ||||
60 | { | ||||
61 | return d->formatValue(value, unit, QString(), precision, prefix, dialect); | ||||
62 | } | ||||
63 | | ||||
64 | QString KFormat::formatValue(double value, | ||||
65 | const QString& unit, | ||||
66 | int precision, | ||||
67 | KFormat::UnitPrefix prefix) const | ||||
68 | { | ||||
69 | return d->formatValue(value, KFormat::Unit::Other, unit, precision, prefix, MetricBinaryDialect); | ||||
70 | } | ||||
71 | | ||||
55 | QString KFormat::formatDuration(quint64 msecs, | 72 | QString KFormat::formatDuration(quint64 msecs, | ||
56 | KFormat::DurationFormatOptions options) const | 73 | KFormat::DurationFormatOptions options) const | ||
57 | { | 74 | { | ||
58 | return d->formatDuration(msecs, options); | 75 | return d->formatDuration(msecs, options); | ||
59 | } | 76 | } | ||
60 | 77 | | |||
61 | QString KFormat::formatDecimalDuration(quint64 msecs, | 78 | QString KFormat::formatDecimalDuration(quint64 msecs, | ||
62 | int decimalPlaces) const | 79 | int decimalPlaces) const | ||
Show All 22 Lines |