summaryrefslogtreecommitdiffstats
path: root/qt-ui/divetripmodel.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-04-13 20:44:02 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-04-13 20:44:02 -0700
commitf5c958ad73db696e473aaa35e144f4c9d8ae24de (patch)
treeef693cc0bbcaea533d007132897c32a7f9e8ea98 /qt-ui/divetripmodel.cpp
parent14e133321f4ac2cff9eb0b84ba9687e5d42e3e46 (diff)
downloadsubsurface-f5c958ad73db696e473aaa35e144f4c9d8ae24de.tar.gz
Add Qtr_ macros that uses gettext in a tr() compatible manner
This should wrap gettext nicely and replace the "_()" macros we use in C code. Also added comments to the top of all the new files. Suggested-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/divetripmodel.cpp')
-rw-r--r--qt-ui/divetripmodel.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/qt-ui/divetripmodel.cpp b/qt-ui/divetripmodel.cpp
index a03603bcf..0a2944d8b 100644
--- a/qt-ui/divetripmodel.cpp
+++ b/qt-ui/divetripmodel.cpp
@@ -1,3 +1,10 @@
+/*
+ * divetripmodel.cpp
+ *
+ * classes for the dive trip list in Subsurface
+ */
+
+#include "common.h"
#include "divetripmodel.h"
@@ -63,15 +70,15 @@ QVariant DiveTripModel::headerData(int section, Qt::Orientation orientation, int
{
if (orientation == Qt::Horizontal && role == Qt::DisplayRole) {
if (section == DIVE_NUMBER) {
- return tr("Dive number");
+ return Qtr_("Dive number");
} else if (section == DIVE_DATE_TIME) {
- return tr("Date");
+ return Qtr_("Date");
} else if (section == DIVE_DURATION) {
- return tr("Duration");
+ return Qtr_("Duration");
} else if (section == DIVE_DEPTH) {
- return tr("Depth");
+ return Qtr_("Depth");
} else if (section == DIVE_LOCATION) {
- return tr("Location");
+ return Qtr_("Location");
}
}
return QVariant();