pyqt_reactive.protocols.component_selection

Component and function selection provider protocols.

Functions

get_component_selection_provider()

Get the registered component selection provider.

get_function_selection_provider()

Get the registered function selection provider.

register_component_selection_provider(provider)

Register a global component selection provider.

register_function_selection_provider(provider)

Register a global function selection provider.

Classes

ComponentSelectionProvider(*args, **kwargs)

Protocol for component selection and display metadata.

FunctionSelectionProvider(*args, **kwargs)

Protocol for selecting a function in UI.

class pyqt_reactive.protocols.component_selection.ComponentSelectionProvider(*args, **kwargs)[source]

Protocol for component selection and display metadata.

get_groupby_enum() Any[source]

Return the GroupBy enum (or compatible enum) used by the host app.

get_component_keys(group_by: Any) List[str][source]

Return available component keys for a given group_by.

has_components_available(group_by: Any) bool[source]

Check if components are available for the given group_by without fetching them all.

Used to determine if UI elements (like component selection buttons) should be enabled. Should return False if the underlying data source (e.g., orchestrator) is not ready.

get_component_display_name(group_by: Any, component_key: str) str | None[source]

Return a human-readable name for a component key.

select_components(available_components: Iterable[str], selected_components: Iterable[str], group_by: Any, parent: Any | None = None, **context: Any) List[str] | None[source]

Show selection UI and return chosen components (or None if canceled).

__init__(*args, **kwargs)
class pyqt_reactive.protocols.component_selection.FunctionSelectionProvider(*args, **kwargs)[source]

Protocol for selecting a function in UI.

select_function(parent: Any | None = None, **context: Any) Callable | None[source]

Return a selected function or None.

__init__(*args, **kwargs)
pyqt_reactive.protocols.component_selection.register_component_selection_provider(provider: ComponentSelectionProvider) None[source]

Register a global component selection provider.

pyqt_reactive.protocols.component_selection.get_component_selection_provider() ComponentSelectionProvider | None[source]

Get the registered component selection provider.

pyqt_reactive.protocols.component_selection.register_function_selection_provider(provider: FunctionSelectionProvider) None[source]

Register a global function selection provider.

pyqt_reactive.protocols.component_selection.get_function_selection_provider() FunctionSelectionProvider | None[source]

Get the registered function selection provider.