diff options
Diffstat (limited to 'qt-ui/profile/diveplotdatamodel.cpp')
-rw-r--r-- | qt-ui/profile/diveplotdatamodel.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/qt-ui/profile/diveplotdatamodel.cpp b/qt-ui/profile/diveplotdatamodel.cpp index 993c09045..51aea1b59 100644 --- a/qt-ui/profile/diveplotdatamodel.cpp +++ b/qt-ui/profile/diveplotdatamodel.cpp @@ -54,6 +54,10 @@ QVariant DivePlotDataModel::data(const QModelIndex &index, int role) const return item.pressures.o2; case HEARTBEAT: return item.heartbeat; + case AMBPRESSURE: + return AMB_PERCENTAGE; + case GFLINE: + return item.gfline; } } @@ -61,6 +65,10 @@ QVariant DivePlotDataModel::data(const QModelIndex &index, int role) const return item.ceilings[index.column() - TISSUE_1]; } + if (role == Qt::DisplayRole && index.column() >= PERCENTAGE_1 && index.column() <= PERCENTAGE_16) { + return item.percentages[index.column() - PERCENTAGE_1]; + } + if (role == Qt::BackgroundRole) { switch (index.column()) { case COLOR: @@ -117,10 +125,15 @@ QVariant DivePlotDataModel::headerData(int section, Qt::Orientation orientation, return tr("pHe"); case PO2: return tr("pO₂"); + case AMBPRESSURE: + return tr("Ambient pressure"); } if (role == Qt::DisplayRole && section >= TISSUE_1 && section <= TISSUE_16) { return QString("Ceiling: %1").arg(section - TISSUE_1); } + if (role == Qt::DisplayRole && section >= PERCENTAGE_1 && section <= PERCENTAGE_16) { + return QString("Tissue: %1").arg(section - PERCENTAGE_1); + } return QVariant(); } |