RodTracker.ui.settings_setup
Includes methods which allow to initialize/change user settings in RodTracker GUI.
Author: Adrian Niemann (adrian.niemann@ovgu.de)
Date: 2022-2024
- clear_select(ui: Ui_MainWindow)[source]
Helper to clear selections of
QSpinBoxafter values changed.
- draw_icon(color: QColor, target: QToolButton)[source]
Helper method to set the color selection button’s background.
- Parameters:
color (QColor)
target (QToolButton)
- handle_color_pick(obj: QToolButton, settings: Settings, category: str, field: str)[source]
Handler function to let the user select a color for a setting.
- Parameters:
obj (QToolButton) – The visual object, that has been clicked.
settings (Settings) – Settings object of the current session of the RodTracker.
category (str) – Category of settings.
field (str) – Field/setting within the
category.
- handle_line_edit_changes(obj: QLineEdit, settings: Settings, category: str, field: str)[source]
Handler function to extract the users’ input from a
QLineEdit.- Parameters:
obj (QLineEdit) – The visual object, that has undergone a change.
settings (Settings) – Settings object of the current session of the RodTracker.
category (str) – Category of settings.
field (str) – Field/setting within the
category.
- init_settings(ui: Ui_MainWindow, settings: Settings)[source]
Initializes the visual elements controlling the RodTracker settings.
During initialization all visual elements handling settings are connected to the necessary functions and retrieve their saved/inital values.
- Parameters:
ui (Ui_MainWindow) – Object containing all visual elements of the RodTracker’s main window.
settings (Settings) – Settings object of the current session of the RodTracker.
- restore_defaults(ui: Ui_MainWindow, settings: Settings)[source]
Resets the displayed settings to the default values.
- Parameters:
ui (Ui_MainWindow) – Object containing all visual elements of the RodTracker’s main window.
settings (Settings) – Settings object of the current session of the RodTracker.
- set_all_values(se: dict, ui: Ui_MainWindow)[source]
Sets the values of all settings elements from a given dictionary.
- Parameters:
se (dict) – Nested settings dictionary.
ui (Ui_MainWindow) – Object containing all visual elements of the RodTracker’s main window.