diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-02-06 23:29:26 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-02-08 10:29:36 -0800 |
commit | f7c73f1987a7069489d66316383b31b3248810b3 (patch) | |
tree | 1ec405daeef82b040c09b7c5135e14c79b13476f /core/qthelper.h | |
parent | 988ccba7105442f34d85ed81e13fd69162eb2b87 (diff) | |
download | subsurface-f7c73f1987a7069489d66316383b31b3248810b3.tar.gz |
mobile/summary: implement firstDiveDate and lastDiveDate
Instead of transporting the global first and last dive date
in the dive summary, calculate it in an external function.
Since we already have time and date functions in qthelper.cpp
implement those functions there. Provide a stub in QMLInterface
so that QML can access these standalone functions.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/qthelper.h')
-rw-r--r-- | core/qthelper.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/qthelper.h b/core/qthelper.h index 090f4fc6f..bd205228b 100644 --- a/core/qthelper.h +++ b/core/qthelper.h @@ -72,6 +72,8 @@ QString render_seconds_to_string(int seconds); QString get_dive_duration_string(timestamp_t when, QString hoursText, QString minutesText, QString secondsText = gettextFromC::tr("sec"), QString separator = ":", bool isFreeDive = false); QString get_dive_surfint_string(timestamp_t when, QString daysText, QString hoursText, QString minutesText, QString separator = " ", int maxdays = 4); QString get_dive_date_string(timestamp_t when); +QString get_first_dive_date_string(); +QString get_last_dive_date_string(); QString get_short_dive_date_string(timestamp_t when); QString get_trip_date_string(timestamp_t when, int nr, bool getday); QString uiLanguage(QLocale *callerLoc); |