summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/diveplotdatamodel.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2014-01-21 14:05:29 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-01-21 09:39:42 -0800
commit9d33640bea9332ca5afb3df71f7a12da9c29e080 (patch)
treeca18df037282a8100deab83c7bb66d8420b70064 /qt-ui/profile/diveplotdatamodel.cpp
parent21d34db3a94e004affdaceb091382b251071d89d (diff)
downloadsubsurface-9d33640bea9332ca5afb3df71f7a12da9c29e080.tar.gz
Add the gas presssure profile texts.
This just adds the texts for the gas profile. I've also added a method on the dataModel() to return the diveId of the last used dive in a way that the other methods can use it. This code is almost 1-to-1 with the old one, a bit of thinkering can be used to merge this loop with the upper one. 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.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/qt-ui/profile/diveplotdatamodel.cpp b/qt-ui/profile/diveplotdatamodel.cpp
index b0532f6a9..e393696dc 100644
--- a/qt-ui/profile/diveplotdatamodel.cpp
+++ b/qt-ui/profile/diveplotdatamodel.cpp
@@ -95,8 +95,14 @@ void DivePlotDataModel::setDive(dive* d,const plot_info& pInfo)
if (d)
dc = select_dc(&d->dc);
+ diveId = d->id;
plotData = pInfo.entry;
sampleCount = pInfo.nr;
beginInsertRows(QModelIndex(), 0, sampleCount-1);
endInsertRows();
}
+
+int DivePlotDataModel::id() const
+{
+ return diveId;
+}