summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/diveplotdatamodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/profile/diveplotdatamodel.cpp')
-rw-r--r--qt-ui/profile/diveplotdatamodel.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/qt-ui/profile/diveplotdatamodel.cpp b/qt-ui/profile/diveplotdatamodel.cpp
index b32918bc5..6635ff1d0 100644
--- a/qt-ui/profile/diveplotdatamodel.cpp
+++ b/qt-ui/profile/diveplotdatamodel.cpp
@@ -38,6 +38,11 @@ QVariant DivePlotDataModel::data(const QModelIndex& index, int role) const
case SAC: return item.sac;
}
}
+
+ if (role == Qt::DisplayRole && index.column() >= TISSUE_1 && index.column() <= TISSUE_16){
+ return item.ceilings[ index.column() - TISSUE_1];
+ }
+
if (role == Qt::BackgroundRole) {
switch (index.column()) {
case COLOR: return getColor((color_indice_t)(VELOCITY_COLORS_START_IDX + item.velocity));
@@ -77,6 +82,9 @@ QVariant DivePlotDataModel::headerData(int section, Qt::Orientation orientation,
case CEILING: return tr("Ceiling");
case SAC: return tr("SAC");
}
+ if (role == Qt::DisplayRole && section >= TISSUE_1 && section <= TISSUE_16){
+ return QString("Ceiling: %1").arg(section - TISSUE_1);
+ }
return QVariant();
}