core/settings:: remove string functions for units

Remove string version of unit_system, duration_units, length, pressure,
temperature, vertical_speed_time, and volume, including tests and make signals
strongly typed in C++

Signed-off-by: jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
jan Iversen 2020-01-07 14:31:49 +01:00 committed by Dirk Hohndel
parent 13b2b9f19c
commit 6e06550631
6 changed files with 60 additions and 183 deletions

View file

@ -50,7 +50,7 @@ void PreferencesUnits::syncSettings()
QString unitSystem[] = {"metric", "imperial", "personal"};
short unitValue = ui->metric->isChecked() ? METRIC : (ui->imperial->isChecked() ? IMPERIAL : PERSONALIZE);
qPrefUnits::set_unit_system(unitSystem[unitValue]);
qPrefUnits::set_unit_system((unit_system_values)unitValue);
qPrefUnits::set_temperature(ui->fahrenheit->isChecked() ? units::FAHRENHEIT : units::CELSIUS);
qPrefUnits::set_length(ui->feet->isChecked() ? units::FEET : units::METERS);
qPrefUnits::set_pressure(ui->psi->isChecked() ? units::PSI : units::BAR);