summaryrefslogtreecommitdiffstats
path: root/qt-ui/models.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/models.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/models.cpp')
-rw-r--r--qt-ui/models.cpp25
1 files changed, 16 insertions, 9 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index dac1c7215..a341c0c70 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -1,3 +1,10 @@
+/*
+ * models.cpp
+ *
+ * classes for the equipment models of Subsurface
+ *
+ */
+#include "common.h"
#include "models.h"
#include "../dive.h"
@@ -15,25 +22,25 @@ QVariant CylindersModel::headerData(int section, Qt::Orientation orientation, in
if (role == Qt::DisplayRole) {
switch(section) {
case TYPE:
- ret = tr("Type");
+ ret = Qtr_("Type");
break;
case SIZE:
- ret = tr("Size");
+ ret = Qtr_("Size");
break;
case MAXPRESS:
- ret = tr("MaxPress");
+ ret = Qtr_("MaxPress");
break;
case START:
- ret = tr("Start");
+ ret = Qtr_("Start");
break;
case END:
- ret = tr("End");
+ ret = Qtr_("End");
break;
case O2:
- ret = tr("O2%");
+ ret = Qtr_("O2%");
break;
case HE:
- ret = tr("He%");
+ ret = Qtr_("He%");
break;
}
}
@@ -157,10 +164,10 @@ QVariant WeightModel::headerData(int section, Qt::Orientation orientation, int r
switch(section){
case TYPE:
- ret = tr("Type");
+ ret = Qtr_("Type");
break;
case WEIGHT:
- ret = tr("Weight");
+ ret = Qtr_("Weight");
break;
}
return ret;