| 87 | void PrefixFormatter::setTrimZeroes(bool trimZeroes) { m_trimZeroes = trimZeroes; } |
| 88 | |
| 89 | QString PrefixFormatter::format(double value, QString unitType = "", int precision = 0) const |
| 90 | { |
| 91 | int index = findPrefixIndex(value); |
| 92 | |
| 93 | return buildString(value / m_prefixes[index].second, m_prefixes[index].first, unitType, precision); |
| 94 | } |
| 95 | |
| 96 | void PrefixFormatter::getFormatAttributes(double value, QString &prefix, double &scale) const |
| 97 | { |
no outgoing calls
no test coverage detected