aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/models.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-08-22 14:41:24 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-08-22 15:02:50 -0700
commit2760f295d2c80802b905abbbd9cb8185ae6bc86d (patch)
tree48570cd9a8cb0bf17b66fa93d9ec7f6c6a38e252 /qt-ui/models.cpp
parentc47594417ae1efc39d6d1da4e7dfb936dafd2863 (diff)
downloadsubsurface-2760f295d2c80802b905abbbd9cb8185ae6bc86d.tar.gz
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 <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/models.cpp')
-rw-r--r--qt-ui/models.cpp16
1 files changed, 9 insertions, 7 deletions
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");