mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Added a 'remove' icon on the dive planner table.
Added a 'remove' icon on the dive planner table, this makes the ui more consistent between the other tables that also manages addition and removal of data. the delete method is still unimplemented. next - css. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
parent
65ab236948
commit
cfd17116eb
2 changed files with 6 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue