Skip to content
Snippets Groups Projects

Refactor reading and storing font and color settings

Merged Oscar Gustafsson requested to merge settingsrefactor into master
Files
2
@@ -182,3 +182,22 @@ def write_to_settings(settings: QSettings):
f"{SIGNAL_WARNING_COLOR_TYPE.name}_changed",
SIGNAL_WARNING_COLOR_TYPE.changed,
)
def reset_color_settings(settings: QSettings):
LATENCY_COLOR_TYPE.changed = False
ACTIVE_COLOR_TYPE.changed = False
SIGNAL_WARNING_COLOR_TYPE.changed = False
SIGNAL_COLOR_TYPE.changed = False
EXECUTION_TIME_COLOR_TYPE.changed = False
settings.beginGroup("scheduler/preferences")
settings.setValue(LATENCY_COLOR_TYPE.name, LATENCY_COLOR_TYPE.DEFAULT.name())
settings.setValue(SIGNAL_COLOR_TYPE.name, SIGNAL_COLOR_TYPE.DEFAULT.name())
settings.setValue(ACTIVE_COLOR_TYPE.name, ACTIVE_COLOR_TYPE.DEFAULT.name())
settings.setValue(
SIGNAL_WARNING_COLOR_TYPE.name, SIGNAL_WARNING_COLOR_TYPE.DEFAULT.name()
)
settings.setValue(
EXECUTION_TIME_COLOR_TYPE.name, EXECUTION_TIME_COLOR_TYPE.DEFAULT.name()
)
settings.endGroup()
Loading