MCPcopy Create free account
hub / github.com/davy7125/polyphone / doubleToString

Method doubleToString

sources/editor/graphics/graphicsviewenvelop.cpp:391–399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

389}
390
391QString GraphicsViewEnvelop::doubleToString(double value, bool accurate)
392{
393 QString txt = QLocale::system().toString(value, 'f', accurate ? 4 : 3);
394 while (!txt.isEmpty() && (txt.endsWith("0")))
395 txt = txt.left(txt.size() - 1);
396 if (!txt.isEmpty() && (txt.endsWith(".") || txt.endsWith(",")))
397 txt = txt.left(txt.size() - 1);
398 return txt;
399}
400
401void GraphicsViewEnvelop::mousePressEvent(QMouseEvent *event)
402{

Callers

nothing calls this directly

Calls 2

toStringMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected