diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-06-03 22:15:19 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-06-04 08:50:10 -0700 |
commit | 36b9e5e31eca0354f9ad277fb668c3846714b81e (patch) | |
tree | 81c2f5127c9f8259cd661ab7947e5607d6e14bd9 /core/qthelper.h | |
parent | 9f349a4efca6ef10efaf2b9c70f2ebb22278747e (diff) | |
download | subsurface-36b9e5e31eca0354f9ad277fb668c3846714b81e.tar.gz |
Cleanup: fold core/helpers.h into core/qthelper.h
helpers.h included qthelper.h and all functions declared in helpers.h
were defined in qthelper.h. Therefore fold the former into the latter,
since the split seems completely arbitrary.
While doing so, change the return-type of get_dc_nichname from
"const QString" to "QString".
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/qthelper.h')
-rw-r--r-- | core/qthelper.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/core/qthelper.h b/core/qthelper.h index e6a5d7fd6..e4c64afa8 100644 --- a/core/qthelper.h +++ b/core/qthelper.h @@ -51,6 +51,48 @@ QString getUUID(); QStringList imageExtensionFilters(); char *intdup(int index); char *copy_qstring(const QString &); +QString get_depth_string(depth_t depth, bool showunit = false, bool showdecimal = true); +QString get_depth_string(int mm, bool showunit = false, bool showdecimal = true); +QString get_depth_unit(); +QString get_weight_string(weight_t weight, bool showunit = false); +QString get_weight_unit(); +QString get_temperature_string(temperature_t temp, bool showunit = false); +QString get_temp_unit(); +QString get_volume_string(volume_t volume, bool showunit = false); +QString get_volume_string(int mliter, bool showunit = false); +QString get_volume_unit(); +QString get_pressure_string(pressure_t pressure, bool showunit = false); +QString get_pressure_unit(); +QString getSubsurfaceDataPath(QString folderToFind); +QString getPrintingTemplatePathUser(); +QString getPrintingTemplatePathBundle(); +QString get_dc_nickname(const char *model, uint32_t deviceid); +int gettimezoneoffset(timestamp_t when = 0); +int parseDurationToSeconds(const QString &text); +int parseLengthToMm(const QString &text); +int parseTemperatureToMkelvin(const QString &text); +int parseWeightToGrams(const QString &text); +int parsePressureToMbar(const QString &text); +int parseGasMixO2(const QString &text); +int parseGasMixHE(const QString &text); +QString render_seconds_to_string(int seconds); +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); +QString get_trip_date_string(timestamp_t when, int nr, bool getday); +QString uiLanguage(QLocale *callerLoc); +QLocale getLocale(); +void selectedDivesGasUsed(QVector<QPair<QString, int> > &gasUsed); +QString getUserAgent(); + +#if defined __APPLE__ +#define TITLE_OR_TEXT(_t, _m) "", _t + "\n" + _m +#else +#define TITLE_OR_TEXT(_t, _m) _t, _m +#endif + #endif // 3) Functions visible to C and C++ |