diff options
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/diveplanner.cpp | 5 | ||||
-rw-r--r-- | qt-ui/diveplanner.h | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index 00e522602..b6ddf518f 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -886,6 +886,11 @@ QVariant DivePlannerPointsModel::data(const QModelIndex& index, int role) const case DURATION: return p.time / 60; } } + if (role == Qt::DecorationRole){ + switch(index.column()){ + case REMOVE : return QIcon(":trash"); + } + } return QVariant(); } diff --git a/qt-ui/diveplanner.h b/qt-ui/diveplanner.h index 643a6a321..3cb3c7014 100644 --- a/qt-ui/diveplanner.h +++ b/qt-ui/diveplanner.h @@ -21,7 +21,7 @@ class DivePlannerPointsModel : public QAbstractTableModel{ Q_OBJECT public: static DivePlannerPointsModel* instance(); - enum Sections{DEPTH, DURATION, GAS, CCSETPOINT, COLUMNS}; + enum Sections{REMOVE, DEPTH, DURATION, GAS, CCSETPOINT, COLUMNS}; virtual int columnCount(const QModelIndex& parent = QModelIndex()) const; virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const; virtual int rowCount(const QModelIndex& parent = QModelIndex()) const; |