devctrl.utility.settings#
Utility for handling measurement settings in a class-based approach.
SettingsClass is sub-class of python’s built-in dataclasses with convenient recursive construction to correctly handle nested classes,
as well as loading and saving to a file.
The class has extensive GUI support in devctrl.gui.settings, with automatic widget creation based on the dataclass.
The widgets respect some metadata fields for tooltips and input validation, making it easy to a generate a complex input widget from a dataclass definition.
This approach also lets you easily save and load+apply the user input between app restarts.
Functions
Merge two dictionaries, but preserve values from lhs that are SettingsClass instances. |
Classes
Base class for settings classes. |