diff options
Diffstat (limited to 'qt-ui/models.cpp')
-rw-r--r-- | qt-ui/models.cpp | 16 |
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; } |