MCPcopy Create free account
hub / github.com/ElementsProject/elements / formatBytes

Function formatBytes

src/qt/guiutil.cpp:870–880  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

868}
869
870QString formatBytes(uint64_t bytes)
871{
872 if (bytes < 1'000)
873 return QObject::tr("%1 B").arg(bytes);
874 if (bytes < 1'000'000)
875 return QObject::tr("%1 kB").arg(bytes / 1'000);
876 if (bytes < 1'000'000'000)
877 return QObject::tr("%1 MB").arg(bytes / 1'000'000);
878
879 return QObject::tr("%1 GB").arg(bytes / 1'000'000'000);
880}
881
882qreal calculateIdealFontSize(int width, const QString& text, QFont font, qreal minPointSize, qreal font_size) {
883 while(font_size >= minPointSize) {

Callers 3

dataMethod · 0.85
updateTrafficStatsMethod · 0.85
updateDetailWidgetMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected