pyqt_reactive.dialogs.group_by_selector_dialog

Group By Selector Dialog for PyQt6 GUI.

Mirrors the Textual TUI GroupBySelectorWindow functionality with dual list selection.

Classes

GroupBySelectorDialog(available_components, ...)

Group by selector dialog that mirrors Textual TUI GroupBySelectorWindow.

class pyqt_reactive.dialogs.group_by_selector_dialog.GroupBySelectorDialog(available_components: List[str], selected_components: List[str], group_by: Any, metadata_lookup: Callable[[Any, str], str | None] | None = None, parent=None)[source]

Group by selector dialog that mirrors Textual TUI GroupBySelectorWindow.

Uses dual list selection with mathematical operations for moving items.

selection_changed

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

__init__(available_components: List[str], selected_components: List[str], group_by: Any, metadata_lookup: Callable[[Any, str], str | None] | None = None, parent=None)[source]

Initialize group by selector dialog.

Parameters:
  • available_components – List of available components

  • selected_components – List of currently selected components

  • group_by – GroupBy enum for component type

  • metadata_lookup – Optional callback to map (group_by, component_key) -> display name

  • parent – Parent widget

setup_ui()[source]

Setup the user interface (mirrors Textual TUI layout).

setup_connections()[source]

Setup signal/slot connections.

update_lists()[source]

Update both list widgets (mirrors Textual TUI _update_lists).

move_right()[source]

Move selected items from available to selected (mirrors Textual TUI _move_right).

move_left()[source]

Move selected items from selected to available (mirrors Textual TUI _move_left).

select_all()[source]

Select all available items (mirrors Textual TUI _select_all).

select_none()[source]

Clear all selections (mirrors Textual TUI _select_none).

accept_selection()[source]

Accept the current selection.

get_selected_components() List[str][source]

Get the selected components.

static select_components(available_components: List[str], selected_components: List[str], group_by: Any, metadata_lookup: Callable[[Any, str], str | None] | None = None, parent=None) List[str] | None[source]

Static method to show group by selector and return selected components.

Parameters:
  • available_components – List of available components

  • selected_components – List of currently selected components

  • group_by – GroupBy enum for component type

  • metadata_lookup – Optional callback to map (group_by, component_key) -> display name

  • parent – Parent widget

Returns:

Selected components or None if cancelled