forked from subsurface/subsurface
-
Notifications
You must be signed in to change notification settings - Fork 1
/
helpers.h
38 lines (34 loc) · 1.36 KB
/
helpers.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
* helpers.h
*
* header file for random helper functions of Subsurface
*
*/
#ifndef HELPER_H
#define HELPER_H
#include <QString>
#include "dive.h"
#include "qthelper.h"
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_cylinder_used_gas_string(cylinder_t *cyl, bool showunit = false);
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_unit();
QString get_pressure_string(pressure_t pressure, bool showunit = false);
QString get_pressure_unit();
void set_default_dive_computer(const char *vendor, const char *product);
void set_default_dive_computer_device(const char *name);
QString getSubsurfaceDataPath(QString folderToFind);
extern const QString get_dc_nickname(const char *model, uint32_t deviceid);
int gettimezoneoffset();
int parseTemperatureToMkelvin(const QString& text);
QString get_dive_date_string(timestamp_t when);
QString get_short_dive_date_string(timestamp_t when);
QString get_trip_date_string(timestamp_t when, int nr);
extern DiveComputerList dcList;
#endif /* HELPER_H */