diff options
author | Anton Lundin <glance@acc.umu.se> | 2014-06-29 20:01:56 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-06-29 17:15:09 -0700 |
commit | b2288e1e3d231ed9d5629942730d49cb7ffec96b (patch) | |
tree | e0fa650bfb8c21c2713f0f172a78aa92d95e9011 /qt-ui | |
parent | c020cda41b7319b7d419607f3f52d830cee4dc98 (diff) | |
download | subsurface-b2288e1e3d231ed9d5629942730d49cb7ffec96b.tar.gz |
Calculate approx gas bill on dives
This uses a bit of naive gas computations to figure out how much of
different base gases you used up on the dives the statistics is done for.
It's quite useful to get a minimum line about how big your gas bill is
going to be after a dive trip.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/maintab.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index b3514e4f2..90a527e3a 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -552,6 +552,9 @@ void MainTab::updateDiveInfo(int dive) } if (!gasUsed.isEmpty()) gasUsedString.append("..."); + volume_t o2_tot = {}, he_tot = {}; + selected_dives_gas_parts(&o2_tot, &he_tot); + gasUsedString.append(QString("These gases could be\nmixed from Air and using:\nHe: %1 and O2: %2\n").arg(get_volume_string(he_tot, true)).arg(get_volume_string(o2_tot, true))); ui.gasConsumption->setText(gasUsedString); } else { /* clear the fields */ |