mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
53a8075bd8
commit
e6d884cf26
13 changed files with 68 additions and 48 deletions
|
|
@ -36,7 +36,8 @@ int parseWeightToGrams(const QString &text);
|
|||
int parsePressureToMbar(const QString &text);
|
||||
int parseGasMixO2(const QString &text);
|
||||
int parseGasMixHE(const QString &text);
|
||||
QString get_dive_duration_string(timestamp_t when, QString hourText, QString minutesText, QString secondsText = "", bool isFreeDive = false);
|
||||
QString get_dive_duration_string(timestamp_t when, QString hoursText, QString minutesText, QString secondsText = QObject::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_short_dive_date_string(timestamp_t when);
|
||||
bool is_same_day (timestamp_t trip_when, timestamp_t dive_when);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue