Improve scaling of speed graphs

Make Y axis scale to fix on predetermined nice looking positions
This commit is contained in:
dzmat 2018-04-02 23:53:44 +07:00
parent c57a7292b6
commit fabd7e34f5
4 changed files with 102 additions and 45 deletions

View file

@ -79,11 +79,10 @@ namespace Utils
QString boostVersionString();
QString libtorrentVersionString();
QString unitString(SizeUnit unit);
QString unitString(SizeUnit unit, bool isSpeed = false);
// return the best user friendly storage unit (B, KiB, MiB, GiB, TiB)
// value must be given in bytes
bool friendlyUnit(qint64 sizeInBytes, qreal &val, SizeUnit &unit);
QString friendlyUnit(qint64 bytesValue, bool isSpeed = false);
int friendlyUnitPrecision(SizeUnit unit);
qint64 sizeInBytes(qreal size, SizeUnit unit);