diff options
author | Robert Helling <helling@atdotde.de> | 2013-10-15 15:09:46 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-10-15 10:34:40 -0700 |
commit | c59d594e00e95be970b90b7cdd110a89ceeced2b (patch) | |
tree | f149faaf15d14184afb1fb259d3a7af595b9aa39 /qt-ui/models.cpp | |
parent | 252caeea1cefaa12e0087b3c0d63da85d055a60e (diff) | |
download | subsurface-c59d594e00e95be970b90b7cdd110a89ceeced2b.tar.gz |
Printing adjustments
Add units to the SAC in the print-out, reduce max depth in metric to one
decimal place, and leave some more characters of the notes to be printed..
Signed-off-by: Robert C. Helling <helling@atdotde.de
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/models.cpp')
-rw-r--r-- | qt-ui/models.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp index 7ea056300..8fedf6a35 100644 --- a/qt-ui/models.cpp +++ b/qt-ui/models.cpp @@ -964,8 +964,8 @@ QString DiveItem::displayDepth() const const int scale = 1000; QString fract, str; if (get_units()->length == units::METERS) { - fract = QString::number((unsigned)(dive->maxdepth.mm % scale) / 10); - str = QString("%1.%2").arg((unsigned)(dive->maxdepth.mm / scale)).arg(fract, 2, QChar('0')); + fract = QString::number((unsigned)(dive->maxdepth.mm % scale) / 100); + str = QString("%1.%2").arg((unsigned)(dive->maxdepth.mm / scale)).arg(fract, 1, QChar('0')); } if (get_units()->length == units::FEET) { str = QString::number(mm_to_feet(dive->maxdepth.mm),'f',0); @@ -1006,9 +1006,9 @@ QString DiveItem::displaySac() const { QString str; if (get_units()->volume == units::LITER) - str = QString::number(dive->sac / 1000.0, 'f', 1); + str = QString::number(dive->sac / 1000.0, 'f', 1).append(tr(" l/min")); else - str = QString::number(ml_to_cuft(dive->sac), 'f', 2); + str = QString::number(ml_to_cuft(dive->sac), 'f', 2).append(tr(" cuft/min")); return str; } @@ -1540,7 +1540,7 @@ QVariant ProfilePrintModel::data(const QModelIndex &index, int role) const } // dive notes if (row == 10 && col == 0) - return truncateString(dive->notes, 64); + return truncateString(dive->notes, 640); // sac, cns, otu - headings if (col == 3) { if (row == 2) |