From 2760f295d2c80802b905abbbd9cb8185ae6bc86d Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 22 Aug 2014 14:41:24 -0700 Subject: Divelist: switch to better column headers And move the units there. This is a long going back and forth. What we want is narrow columns. But what we need is something that's easy to understand for our users. I'm open to other suggestions, but I think this moves us in the right direction. See #712 Signed-off-by: Dirk Hohndel --- qt-ui/models.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'qt-ui') diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp index 82fdbdc43..a33b9310c 100644 --- a/qt-ui/models.cpp +++ b/qt-ui/models.cpp @@ -1267,7 +1267,7 @@ QString DiveItem::displaySac() const const char *unit; int decimal; double value = get_volume_units(dive->sac, &decimal, &unit); - return QString::number(value, 'f', decimal).append(unit).append(tr("/min")); + return QString::number(value, 'f', decimal); } return QString(""); } @@ -1318,19 +1318,19 @@ QVariant DiveTripModel::headerData(int section, Qt::Orientation orientation, int ret = tr("Date"); break; case RATING: - ret = UTF8_BLACKSTAR; + ret = tr("Rating"); break; case DEPTH: - ret = (get_units()->length == units::METERS) ? tr("m") : tr("ft"); + ret = tr("Depth(%1)").arg((get_units()->length == units::METERS) ? tr("m") : tr("ft")); break; case DURATION: - ret = tr("Mins"); + ret = tr("Duration"); break; case TEMPERATURE: - ret = QString("%1%2").arg(UTF8_DEGREE).arg((get_units()->temperature == units::CELSIUS) ? "C" : "F"); + ret = tr("Temp(%1%2)").arg(UTF8_DEGREE).arg((get_units()->temperature == units::CELSIUS) ? "C" : "F"); break; case TOTALWEIGHT: - ret = (get_units()->weight == units::KG) ? tr("kg") : tr("lbs"); + ret = tr("Weight(%1)").arg((get_units()->weight == units::KG) ? tr("kg") : tr("lbs")); break; case SUIT: ret = tr("Suit"); @@ -1342,7 +1342,9 @@ QVariant DiveTripModel::headerData(int section, Qt::Orientation orientation, int ret = tr("Gas"); break; case SAC: - ret = tr("SAC"); + const char *unit; + get_volume_units(0, NULL, &unit); + ret = tr("SAC(%1)").arg(QString(unit).append(tr("/min"))); break; case OTU: ret = tr("OTU"); -- cgit v1.2.3-70-g09d2