Map Short Names - add preference setting

Adds a preference setting in the "Default" settings tab to toggle whether
to display shortened names in the Map.

TODO: instead of using the generic "settingsChanged" signal, it would be much
more efficient to only update items based on the actual setting which was
changed.

Signed-off-by: Michael WERLE <micha@michaelwerle.com>
This commit is contained in:
Michael Werle 2022-08-17 09:17:04 +09:00 committed by Dirk Hohndel
parent 3dbba5ae69
commit efb1832db8
7 changed files with 44 additions and 3 deletions

View file

@ -32,6 +32,8 @@ void PreferencesDefaults::refreshSettings()
ui->grid3MBased->setChecked(true);
else
ui->gridGeneric->setChecked(true);
ui->checkBox_map_short_names->setChecked(qPrefDisplay::map_short_names());
}
void PreferencesDefaults::syncSettings()
@ -40,4 +42,5 @@ void PreferencesDefaults::syncSettings()
qPrefDisplay::set_font_size(ui->fontsize->value());
qPrefDisplay::set_animation_speed(ui->velocitySlider->value());
qPrefDisplay::set_three_m_based_grid(ui->grid3MBased->isChecked());
qPrefDisplay::set_map_short_names(ui->checkBox_map_short_names->isChecked());
}