import numpy as np from typing import Optional, Tuple, Any class ApplicationState: """ Encapsulates the runtime state of the Radalyze application. This class acts as a centralized data container for the application's state, avoiding the use of global variables. An instance of this class will be held by the main application window. """ def __init__(self): """Initializes the application state with default values.""" # --- File and Path Management --- self.last_used_directory: str = "." self.last_file_path: Optional[str] = None self.last_data_type: Optional[str] = None # e.g., "Vector" or "Matrix" # --- Data Cache --- self.matrix_data: Optional[np.ndarray] = None # --- Visualization and UI State --- self.current_colormap: str = "viridis" self.original_xlim: Optional[Tuple[float, float]] = None self.original_ylim: Optional[Tuple[float, float]] = None self.current_domain: str = "frequencies" # "frequencies" or "space" self.is_profile_hotkey_pressed: bool = False