sec_interp.core.controller module

class sec_interp.core.controller.ProfileController[source]

Bases: object

Orchestrates data generation services for SecInterp profile creation.

__init__()[source]

Initialize services and the data cache.

cache_data(inputs: dict[str, Any], data: dict[str, Any]) None[source]

Cache the generated data resulting from the given inputs.

Parameters:
  • inputs – Dictionary of input parameters to generate cache key.

  • data – Data dictionary to cache.

connect_layer_notifications(layers: list[Any]) None[source]

Connect to layer signals for automatic cache invalidation on data changes.

Parameters:

layers – List of QgsMapLayer objects to monitor.

generate_profile_data(params: PreviewParams) tuple[list[tuple[float, float]], list[Any] | None, list[Any] | None, Any | None, list[str]][source]

Unified method to generate all profile data components with granular caching.

get_cached_data(inputs: dict[str, Any]) dict[str, Any] | None[source]

Retrieve data from cache if available for the given inputs.

Parameters:

inputs – Dictionary of input parameters to generate cache key.

Returns:

Cached data dictionary if found, else None.