From b2288e1e3d231ed9d5629942730d49cb7ffec96b Mon Sep 17 00:00:00 2001 From: Anton Lundin Date: Sun, 29 Jun 2014 20:01:56 +0200 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/maintab.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'qt-ui') 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 */ -- cgit v1.2.3-70-g09d2