radioviz.typing.sub_window_types

Protocols for sub-window views and controllers.

These protocols provide a narrow typing boundary between view and controller layers to avoid circular imports while keeping explicit, precise annotations.

Classes

SubWindowControllerProtocol(*args, **kwargs)

Minimal interface a sub-window view relies on.

SubWindowViewProtocol(*args, **kwargs)

Minimal interface a sub-window controller relies on.

class radioviz.typing.sub_window_types.SubWindowControllerProtocol(*args, **kwargs)[source]

Bases: Protocol

Minimal interface a sub-window view relies on.

set_view(view: Any) None[source]

Associate the controller with a view instance.

Parameters:

view (Any) – View instance to associate.

class radioviz.typing.sub_window_types.SubWindowViewProtocol(*args, **kwargs)[source]

Bases: Protocol

Minimal interface a sub-window controller relies on.

Implemented by concrete sub-window views.

close() bool[source]

Close the window.

Returns:

True if the window was closed.

Return type:

bool

on_data_state_changed() None[source]

Handle data state changes triggered by the controller.

raise_() None[source]

Raise the window to the front.

set_window_state(state: WindowState) None[source]

Set the window state.

Parameters:

state (WindowState) – Desired window state.

window_state() WindowState[source]

Return the current window state.

Returns:

Current window state.

Return type:

WindowState