mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Add units and nicer formating for items in profile info box
"SP change" info format in info box: Added/changed formating and add "bar" unit. "waypoint above ceiling" event in info box: Added formating, depth conversation to ft/m and depth unit. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
This commit is contained in:
parent
b39b641a05
commit
508387b1e1
1 changed files with 4 additions and 0 deletions
|
@ -156,6 +156,10 @@ void DiveEventItem::setupToolTipString()
|
|||
} else if (value) {
|
||||
if (type == SAMPLE_EVENT_PO2 && same_string(internalEvent->name, "SP change")) {
|
||||
name += QString(": %1bar").arg((double)value / 1000, 0, 'f', 1);
|
||||
} else if (type == SAMPLE_EVENT_CEILING && same_string(internalEvent->name, "planned waypoint above ceiling")) {
|
||||
const char *depth_unit;
|
||||
double depth_value = get_depth_units(value*1000, NULL, &depth_unit);
|
||||
name += QString(": %1%2").arg((int) round(depth_value)).arg(depth_unit);
|
||||
} else {
|
||||
name += QString(": %1").arg(value);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue