fxconfig
Configuration and settings management for fxgui.
This module provides persistent storage for application settings using QSettings with INI format. Settings are stored in platform-appropriate locations: - Windows: %APPDATA%/fxgui/settings.ini - Unix/macOS: ~/.fxgui/settings.ini
Functions:
| Name | Description |
|---|---|
get_settings |
Get the QSettings instance for fxgui. |
get_config_dir |
Get the configuration directory path. |
get_value |
Get a setting value. |
set_value |
Set a setting value. |
Examples:
Getting and setting values:
>>> from fxgui import fxconfig
>>> fxconfig.set_value("theme/current", "dracula")
>>> theme = fxconfig.get_value("theme/current", "dark")
get_config_dir
get_settings
Get the QSettings instance for fxgui.
Settings are stored in an INI file at the platform-appropriate location. The instance is cached for reuse.
Returns:
| Type | Description |
|---|---|
QSettings
|
QSettings instance configured for fxgui using INI format. |
Examples:
get_value
Get a setting value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str
|
The setting key (e.g., "theme/current"). |
required |
|
Any
|
Default value if the key doesn't exist. |
None
|
Returns:
| Type | Description |
|---|---|
Any
|
The setting value, or the default if not found. |
Examples: