Commit graph

8 commits

Author SHA1 Message Date
Stefan Fuchs
8212a923b2 Use MAX_CYLINDERS consistently
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-11-27 22:40:16 +01:00
Stefan Fuchs
e6d884cf26 Creation of dive duration string and surface interval string
Update the function to create the dive duration string in a way that
it can be used also in info and stats tab and added some more flexibility.

Changed layout for <1h freedives to "0:05:35" (w/o units) or "5:35min"
(with units and :) or "5min 35sec" (with units with space).

Add a new function to create the surface interval string.

Completely remove old function get_time_string() and get_time_string_s().

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-05-26 15:50:52 -07:00
Stefan Fuchs
a784b15cb8 Update translation and strings for gas usage in stats
Giving the string " and " to transiflex seems to fail and/or
it's highly possible that the translators make a mistake by
translating it into "and" or " and" or "and ".
Change the string to "and" and hard code the whitespaces before and after.

Change O2 to O₂ in statistics.

Translate "He" and "O2" in statistics.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-05-01 21:24:02 -07:00
Stefan Fuchs
257f7c082d Show min/max SAC in statistics only if different to average...
...and don't show a minimum depth in stats if there is only a single dive.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-05-01 21:24:02 -07:00
Dirk Hohndel
9021a44ccc Add SPDX header to desktop widgets
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-29 13:32:55 -07:00
Anton Lundin
cd27c1cd44 Hide avg max depth thingie
We don't set it so just hide it.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-04-26 21:27:37 -07:00
Anton Lundin
1ec0d43e63 Always set min/max sac in statistics tab
It just looks weird when they aren't set, just because you only selected
one dive.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-04-26 21:27:37 -07:00
Tomaz Canabrava
1fc4fba69f Break down MainTab into smaller classes
Maintab is one of our most complex classes, and it's
something I'm not actually proud of. But it currently
works and the idea of splitting it was in my head for
quite a while.

This is the third or fourth tentative of splitting it,
and this time I let the most complex part of it untouched,
the Notes and Equipment tab are way too complex to untangle
right now on my limited time.

A new class 'TabBase' should be used for any new tab that
we may create, and added on the MainTab (see the new lines
on the MainTab constructor).

Also, Extra Info, Information, Photos and Statistics where
ported to this new way helping reduce the number of
lines and functions on the MainTab quite a bit.

Overall this is a step in the right direction for the future.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-06 18:23:25 -07:00