summaryrefslogtreecommitdiffstats
path: root/qt-ui/models.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-11-21 23:32:11 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-22 07:34:24 -0800
commitbc461d091c9d6a7b027d76347b328ff8b33e23ce (patch)
tree547e5547486cd4ac75fb792da389cdbaec6fbc4a /qt-ui/models.cpp
parentcee021ddd3d67bfcbcaf1b51c33ee4ba4e83125e (diff)
downloadsubsurface-bc461d091c9d6a7b027d76347b328ff8b33e23ce.tar.gz
Added a bunch of tooltips where I thought it was sane.
I think we should actually fill the app with tooltips and whatsthis hints. justsain ;p Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> 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, 14 insertions, 2 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index 01325638c..f44704939 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -163,6 +163,11 @@ QVariant CylindersModel::data(const QModelIndex& index, int role) const
if (index.column() == REMOVE)
ret = QIcon(":trash");
break;
+
+ case Qt::ToolTipRole:
+ if (index.column() == REMOVE)
+ ret = tr("Clicking here will remove this cylinder.");
+ break;
}
return ret;
@@ -459,6 +464,10 @@ QVariant WeightModel::data(const QModelIndex& index, int role) const
if (index.column() == REMOVE)
ret = QIcon(":trash");
break;
+ case Qt::ToolTipRole:
+ if (index.column() == REMOVE)
+ ret = tr("Clicking here will remove this weigthsystem.");
+ break;
}
return ret;
}
@@ -1255,8 +1264,11 @@ QVariant DiveComputerModel::data(const QModelIndex& index, int role) const
}
}
- if (role == Qt::DecorationRole && index.column() == REMOVE){
- ret = QIcon(":trash");
+ if (index.column() == REMOVE){
+ switch(role){
+ case Qt::DecorationRole : ret = QIcon(":trash"); break;
+ case Qt::ToolTipRole : ret = tr("Clicking here will remove this divecomputer."); break;
+ }
}
return ret;
}