summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/diveplotdatamodel.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2014-01-23 17:54:34 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-01-23 21:11:15 -0800
commitcaa45a15396a737ecbef1161e302735b148cc236 (patch)
tree0a019ed7f5ba0438b36b4268fc2c73d31c7caaee /qt-ui/profile/diveplotdatamodel.cpp
parentfd45e646dcee98978b85d4776dfbec2eb1587076 (diff)
downloadsubsurface-caa45a15396a737ecbef1161e302735b148cc236.tar.gz
Added the first Partial Gas Pressure: PN2
This makes the beginning of the partial gas pressures, there's two more. but this code uses a good part of the Model View system, and it's way clearer than the old one. Luckly the other 2 missing items will be even more clear ( the diffs ) to do, because I just need to create a new PartialPressureGasItem and set the properties. <3 Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/diveplotdatamodel.cpp')
-rw-r--r--qt-ui/profile/diveplotdatamodel.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/qt-ui/profile/diveplotdatamodel.cpp b/qt-ui/profile/diveplotdatamodel.cpp
index 6635ff1d0..b523472cf 100644
--- a/qt-ui/profile/diveplotdatamodel.cpp
+++ b/qt-ui/profile/diveplotdatamodel.cpp
@@ -36,6 +36,7 @@ QVariant DivePlotDataModel::data(const QModelIndex& index, int role) const
case INTERPOLATED_PRESSURE: return item.pressure[1];
case CEILING: return item.ceiling;
case SAC: return item.sac;
+ case PN2: return item.pn2;
}
}
@@ -81,6 +82,7 @@ QVariant DivePlotDataModel::headerData(int section, Qt::Orientation orientation,
case INTERPOLATED_PRESSURE: return tr("Pressure I");
case CEILING: return tr("Ceiling");
case SAC: return tr("SAC");
+ case PN2: return tr("PN2");
}
if (role == Qt::DisplayRole && section >= TISSUE_1 && section <= TISSUE_16){
return QString("Ceiling: %1").arg(section - TISSUE_1);