summaryrefslogtreecommitdiffstats
path: root/qt-ui/maintab.cpp
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2013-11-20 00:29:32 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-19 15:46:19 -0800
commiteb027f2a4b83ed8eb127f0c736021556aa3952a0 (patch)
tree47fa07043bb40899c621429b0dca5ea3d61c27dd /qt-ui/maintab.cpp
parent732f7a69b08e279c88f3ce7d946e986734d0e3f7 (diff)
downloadsubsurface-eb027f2a4b83ed8eb127f0c736021556aa3952a0.tar.gz
Do per cylinder statistics
This shows how much gas form each cylinder was used. I would like to add SAC to that list too but it became a mess trying to calculate average depth per cylinder. Design based on idea in #284 Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r--qt-ui/maintab.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 763c61ec5..3398c6290 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -350,7 +350,12 @@ void MainTab::updateDiveInfo(int dive)
ui.otuText->setText(QString("%1").arg(d->otu));
ui.waterTemperatureText->setText(get_temperature_string(d->watertemp, TRUE));
ui.airTemperatureText->setText(get_temperature_string(d->airtemp, TRUE));
- ui.gasUsedText->setText(get_volume_string(get_gas_used(d), TRUE));
+ volume_t gases[MAX_CYLINDERS] = { 0 };
+ get_gas_used(d, gases);
+ QString volumes = get_volume_string(gases[0], TRUE);
+ for(int i=1; i < MAX_CYLINDERS && gases[i].mliter != 0; i++)
+ volumes.append("\n" + get_volume_string(gases[i], TRUE));
+ ui.gasUsedText->setText(volumes);
ui.oxygenHeliumText->setText(get_gaslist(d));
ui.dateText->setText(get_short_dive_date_string(d->when));
ui.diveTimeText->setText(QString::number((int)((d->duration.seconds + 30) / 60)));