From bc461d091c9d6a7b027d76347b328ff8b33e23ce Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Thu, 21 Nov 2013 23:32:11 -0200 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/models.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'qt-ui') 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; } -- cgit v1.2.3-70-g09d2