mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Wire up duration units preference UI
Now we track the preference, but we don't act on it, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
38b9185974
commit
876b479d69
5 changed files with 47 additions and 8 deletions
23
core/units.h
23
core/units.h
|
|
@ -255,6 +255,11 @@ struct units {
|
|||
SECONDS,
|
||||
MINUTES
|
||||
} vertical_speed_time;
|
||||
enum DURATION {
|
||||
MIXED,
|
||||
MINUTES_ONLY,
|
||||
ALWAYS_HOURS
|
||||
} duration_units;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -264,15 +269,17 @@ struct units {
|
|||
* actually use. Similarly, C instead of Kelvin.
|
||||
* And kg instead of g.
|
||||
*/
|
||||
#define SI_UNITS \
|
||||
{ \
|
||||
.length = METERS, .volume = LITER, .pressure = BAR, .temperature = CELSIUS, .weight = KG, .vertical_speed_time = MINUTES \
|
||||
}
|
||||
#define SI_UNITS \
|
||||
{ \
|
||||
.length = METERS, .volume = LITER, .pressure = BAR, .temperature = CELSIUS, .weight = KG, \
|
||||
.vertical_speed_time = MINUTES, .duration_units = MIXED \
|
||||
}
|
||||
|
||||
#define IMPERIAL_UNITS \
|
||||
{ \
|
||||
.length = FEET, .volume = CUFT, .pressure = PSI, .temperature = FAHRENHEIT, .weight = LBS, .vertical_speed_time = MINUTES \
|
||||
}
|
||||
#define IMPERIAL_UNITS \
|
||||
{ \
|
||||
.length = FEET, .volume = CUFT, .pressure = PSI, .temperature = FAHRENHEIT, .weight = LBS, \
|
||||
.vertical_speed_time = MINUTES, .duration_units = MIXED \
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue