| 895 | } |
| 896 | |
| 897 | QString 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 | |
| 909 | qreal calculateIdealFontSize(int width, const QString& text, QFont font, qreal minPointSize, qreal font_size) { |
| 910 | while(font_size >= minPointSize) { |
no outgoing calls
no test coverage detected