nqrduck.core.main_model#
The main model for the application.
Classes
|
The main model for the application. |
|
Manages the settings for the application. |
- class nqrduck.core.main_model.MainModel(*args: Any, **kwargs: Any)#
The main model for the application.
This class is the main model for the application. It holds the different modules that have been loaded. It also holds the active module and the status bar message.
- Signals:
module_added : Emitted when a module has been added active_module_changed : Emitted when the active module has changed statusbar_message_changed : Emitted when the status bar message has changed
- property active_module#
The active module.
- add_module(name: str, module: nqrduck.module.module.Module) None#
Adds a module to the loaded modules dictionary.
- Parameters:
name (str) – The name of the module
module (Module) – The module to add
- property loaded_modules: dict#
Dict with the different modules that have been loaded.
The key is the name of the module and the value is the module object.
- property statusbar_message#
The status bar message displayed in the main window.
- statusbar_message_changed#
alias of
str
- class nqrduck.core.main_model.SettingsManager(*args: Any, **kwargs: Any)#
Manages the settings for the application.
This can be the font, the theme, the window size, etc.
- Parameters:
parent (QObject) – The parent object
- property dark_mode: bool#
Whether dark mode is enabled.
- property font: PyQt6.QtGui.QFont#
The font used for the application.
- property font_size: int#
The font size used for the application.
- property module_order: list#
The order in which the modules are displayed in the main window.
- reset_settings() None#
Resets the settings to default values.
- property settings: PyQt6.QtCore.QSettings#
The settings object.
- property style_factory: str#
The style factory used for the application.