MCPcopy Create free account
hub / github.com/IENT/YUView / formatValue

Method formatValue

YUViewLib/src/parser/common/HRDPlotModel.cpp:151–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151QString HRDPlotModel::formatValue(Axis axis, double value) const
152{
153 if (axis == Axis::X)
154 {
155 const auto timeScale = 1000; // This results in the time being in ms
156 const auto milliseconds = int(value * timeScale);
157 return QTime(0, 0).addMSecs(milliseconds).toString("hh:mm:ss.zzz");
158 }
159 else
160 // The value is bytes
161 return functions::formatDataSize(value, false);
162}
163
164void HRDPlotModel::addHRDEntry(HRDPlotModel::HRDEntry &entry)
165{

Callers 2

drawAxisTickLabelsMethod · 0.45
getMaxLabelDrawSizeMethod · 0.45

Calls 2

formatDataSizeFunction · 0.85
toStringMethod · 0.80

Tested by

no test coverage detected