diff options
Diffstat (limited to 'desktop-widgets/tab-widgets')
-rw-r--r-- | desktop-widgets/tab-widgets/TabDiveInformation.cpp | 8 | ||||
-rw-r--r-- | desktop-widgets/tab-widgets/TabDiveStatistics.cpp | 13 |
2 files changed, 13 insertions, 8 deletions
diff --git a/desktop-widgets/tab-widgets/TabDiveInformation.cpp b/desktop-widgets/tab-widgets/TabDiveInformation.cpp index 8410c022c..d687cdcd7 100644 --- a/desktop-widgets/tab-widgets/TabDiveInformation.cpp +++ b/desktop-widgets/tab-widgets/TabDiveInformation.cpp @@ -74,15 +74,15 @@ void TabDiveInformation::updateData() ui->gasUsedText->setText(volumes); ui->oxygenHeliumText->setText(gaslist); - int sum = displayed_dive.dc.divemode != FREEDIVE ? 30 : 0; - ui->diveTimeText->setText(get_time_string_s(displayed_dive.duration.seconds + sum, 0, false)); + ui->diveTimeText->setText(get_dive_duration_string(displayed_dive.duration.seconds, tr("h"), tr("min"), tr("sec"), + " ", displayed_dive.dc.divemode == FREEDIVE)); struct dive *prevd; process_all_dives(&displayed_dive, &prevd); if (prevd) - ui->surfaceIntervalText->setText(get_time_string_s(displayed_dive.when - (prevd->when + prevd->duration.seconds), 4, - (displayed_dive.dc.divemode == FREEDIVE))); + ui->surfaceIntervalText->setText(get_dive_surfint_string(displayed_dive.when - (prevd->when + prevd->duration.seconds), tr("d"), tr("h"), tr("min"))); + else ui->surfaceIntervalText->clear(); diff --git a/desktop-widgets/tab-widgets/TabDiveStatistics.cpp b/desktop-widgets/tab-widgets/TabDiveStatistics.cpp index e05f076a9..53bab0ef5 100644 --- a/desktop-widgets/tab-widgets/TabDiveStatistics.cpp +++ b/desktop-widgets/tab-widgets/TabDiveStatistics.cpp @@ -84,14 +84,19 @@ void TabDiveStatistics::updateData() ui->divesAllText->setText(QString::number(stats_selection.selection_size)); - ui->totalTimeAllText->setText(get_time_string_s(stats_selection.total_time.seconds, 0, (displayed_dive.dc.divemode == FREEDIVE))); + ui->totalTimeAllText->setText(get_dive_duration_string(stats_selection.total_time.seconds, tr("h"), tr("min"), tr("sec"), + " ", displayed_dive.dc.divemode == FREEDIVE)); + int seconds = stats_selection.total_time.seconds; if (stats_selection.selection_size) seconds /= stats_selection.selection_size; - ui->timeLimits->setAverage(get_time_string_s(seconds, 0,(displayed_dive.dc.divemode == FREEDIVE))); + ui->timeLimits->setAverage(get_dive_duration_string(seconds, tr("h"), tr("min"), tr("sec"), + " ", displayed_dive.dc.divemode == FREEDIVE)); if (amount_selected > 1) { - ui->timeLimits->setMaximum(get_time_string_s(stats_selection.longest_time.seconds, 0, (displayed_dive.dc.divemode == FREEDIVE))); - ui->timeLimits->setMinimum(get_time_string_s(stats_selection.shortest_time.seconds, 0, (displayed_dive.dc.divemode == FREEDIVE))); + ui->timeLimits->setMaximum(get_dive_duration_string(stats_selection.longest_time.seconds, tr("h"), tr("min"), tr("sec"), + " ", displayed_dive.dc.divemode == FREEDIVE)); + ui->timeLimits->setMinimum(get_dive_duration_string(stats_selection.shortest_time.seconds, tr("h"), tr("min"), tr("sec"), + " ", displayed_dive.dc.divemode == FREEDIVE)); } else { ui->timeLimits->setMaximum(""); ui->timeLimits->setMinimum(""); |