diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2018-04-14 17:34:33 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-04-14 17:39:40 -0700 |
commit | 6a51c14365067fc45365c2a970d76749d9502a9d (patch) | |
tree | febd2c4ee2f47f7a62a56f717f882975b04ac0b5 /core/subsurface-qt/DiveObjectHelper.cpp | |
parent | 4923aecc9d35a2419512520d6c38f12ce71733e6 (diff) | |
download | subsurface-6a51c14365067fc45365c2a970d76749d9502a9d.tar.gz |
DiveObjectHelper: expose number of dives in a trip
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/subsurface-qt/DiveObjectHelper.cpp')
-rw-r--r-- | core/subsurface-qt/DiveObjectHelper.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/subsurface-qt/DiveObjectHelper.cpp b/core/subsurface-qt/DiveObjectHelper.cpp index 4c1c66e21..084da4fd3 100644 --- a/core/subsurface-qt/DiveObjectHelper.cpp +++ b/core/subsurface-qt/DiveObjectHelper.cpp @@ -360,6 +360,12 @@ QString DiveObjectHelper::tripMeta() const return ret; } +int DiveObjectHelper::tripNrDives() const +{ + struct dive_trip *dt = m_dive->divetrip; + return dt ? dt->nrdives : 0; +} + int DiveObjectHelper::maxcns() const { return m_dive->maxcns; |