A collection of functions for formatting values for display.
More...
#include <Formatters.h++>
A collection of functions for formatting values for display.
- Author
- Mark Lindner
◆ formatFileSize()
| static QString formatFileSize |
( |
qint64 |
fileSize, |
|
|
int |
decimals = 1 |
|
) |
| |
|
static |
Formats a file size.
- Parameters
-
| fileSize | The file size, in bytes. |
| decimals | The number of decimals of precision to include. |
- Returns
- The file size formatted as a string.
◆ formatSize()
| static QString formatSize |
( |
const QSize & |
size | ) |
|
|
static |
Formats a rectangle size.
- Parameters
-
- Returns
- The size formatted as a string, in the form widthxheight.
◆ formatTimeInterval()
| static QString formatTimeInterval |
( |
qint64 |
millisec, |
|
|
bool |
includeMillisec = false |
|
) |
| |
|
static |
Formats a time interval.
- Parameters
-
| millsec | The time interval, in milliseconds. |
| millisec | Whether milliseconds should be included in the output. |
- Returns
- The time interval, formatted as a string, in the form xxxd hh:mm:ss.SSS.
The documentation for this class was generated from the following file: