sec_interp.core.config module¶
Configuration Service Module.
Provides a centralized way to manage plugin settings using QgsSettings.
- class sec_interp.core.config.ConfigService¶
Bases:
objectService to handle plugin configuration and persistence.
Initialize the configuration service.
- PREFIX = '/SecInterp/'¶
- DEFAULTS = {'auto_lod': True, 'buffer_dist': 100.0, 'dip_scale_factor': 1.0, 'dpi': 300, 'export_quality': 95, 'last_output_dir': '', 'max_preview_points': 10000, 'preview_height': 600, 'preview_width': 800, 'sampling_interval': 10.0, 'scale': 500.0, 'vert_exag': 1.0}¶
- SUPPORTED_IMAGE_FORMATS = ['.png', '.jpg', '.jpeg']¶
- SUPPORTED_VECTOR_FORMATS = ['.shp']¶
- SUPPORTED_DOCUMENT_FORMATS = ['.pdf', '.svg']¶
- __init__()¶
Initialize the configuration service.
- get(key: str, default: Any = None) Any¶
Get a configuration value.
- Parameters:
key – The configuration key (without prefix).
default – Optional default value if not found.
- Returns:
The configuration value.
- set(key: str, value: Any) None¶
Set a configuration value.
- Parameters:
key – The configuration key (without prefix).
value – The value to set.
- reset_defaults() None¶
Reset all known settings to their default values.