MCPcopy Create free account
hub / github.com/analogdevicesinc/scopy / format

Method format

gui/src/plot_utils.cpp:89–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87void PrefixFormatter::setTrimZeroes(bool trimZeroes) { m_trimZeroes = trimZeroes; }
88
89QString 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
96void PrefixFormatter::getFormatAttributes(double value, QString &prefix, double &scale) const
97{

Callers 8

getScaleFactorMethod · 0.45
labelMethod · 0.45
trackerTextMethod · 0.45
updateInfoMethod · 0.45
setValueMethod · 0.45
updateMethod · 0.45
updateMethod · 0.45
sink_it_Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected