aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/maintab.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-19 08:08:29 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-19 08:08:29 -0700
commit1298aa87e519addde0f5490b238395fcaf8b4e95 (patch)
treef8e6478e7091bef9f54005df8d94351528faefbe /qt-ui/maintab.cpp
parent0cb9b9ccfba97916077a2251153a2f99a44ba9ca (diff)
downloadsubsurface-1298aa87e519addde0f5490b238395fcaf8b4e95.tar.gz
Continue populating the DiveInfo tab
Pulled one more helper from statistics-gtk.c (but didn't modify the code there to use it as that code is no longer being compiled). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r--qt-ui/maintab.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index be079cf31..bebbc109c 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -102,7 +102,10 @@ void MainTab::updateDiveInfo(int dive)
// click on the item and check its objectName,
// the access is ui->objectName from here on.
volume_t sacVal;
+ struct dive *prevd;
struct dive *d = get_dive(dive);
+
+ process_all_dives(d, &prevd);
currentDive = d;
UPDATE_TEXT(d, notes);
UPDATE_TEXT(d, location);
@@ -118,6 +121,11 @@ void MainTab::updateDiveInfo(int dive)
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));
+ ui->oxygenHeliumText->setText(get_gaslist(d));
+ ui->dateText->setText(get_dive_date_string(d->when));
+ ui->diveTimeText->setText(QString::number((int)((d->duration.seconds + 30) / 60)));
+ if (prevd)
+ ui->surfaceIntervalText->setText(get_time_string(d->when - (prevd->when + prevd->duration.seconds), 4));
if ((sacVal.mliter = d->sac) > 0)
ui->sacText->setText(get_volume_string(sacVal, TRUE).append("/min"));
else