MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / formatBytes

Function formatBytes

src/qt/guiutil.cpp:897–907  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

895}
896
897QString formatBytes(uint64_t bytes)
898{
899 if(bytes < 1024)
900 return QString(QObject::tr("%1 B")).arg(bytes);
901 if(bytes < 1024 * 1024)
902 return QString(QObject::tr("%1 KB")).arg(bytes / 1024);
903 if(bytes < 1024 * 1024 * 1024)
904 return QString(QObject::tr("%1 MB")).arg(bytes / 1024 / 1024);
905
906 return QString(QObject::tr("%1 GB")).arg(bytes / 1024 / 1024 / 1024);
907}
908
909qreal calculateIdealFontSize(int width, const QString& text, QFont font, qreal minPointSize, qreal font_size) {
910 while(font_size >= minPointSize) {

Callers 3

dataMethod · 0.85
updateTrafficStatsMethod · 0.85
updateNodeDetailMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected