pyqt_reactive.widgets.shared.column_filter_widget

Column filter widget with checkboxes for unique values.

Provides Excel-like column filtering with checkboxes for each unique value. Multiple columns can be filtered simultaneously with AND logic across columns.

Classes

ColumnFilterWidget(column_name, unique_values)

Filter widget for a single column showing checkboxes for unique values.

MultiColumnFilterPanel([color_scheme, parent])

Panel containing filters for multiple columns with resizable splitters.

NonCompressingSplitter(*args, **kwargs)

A QSplitter that maintains its size based on widget sizes, not available space.

class pyqt_reactive.widgets.shared.column_filter_widget.NonCompressingSplitter(*args, **kwargs)[source]

A QSplitter that maintains its size based on widget sizes, not available space.

When handles are moved, this splitter grows the total size instead of redistributing space among widgets.

__init__(*args, **kwargs)[source]
moveSplitter(pos, index)[source]

Override to grow total size instead of redistributing space.

resizeEvent(event)[source]

Override to prevent automatic size redistribution.

class pyqt_reactive.widgets.shared.column_filter_widget.ColumnFilterWidget(column_name: str, unique_values: List[str], color_scheme: ColorScheme | None = None, parent=None)[source]

Filter widget for a single column showing checkboxes for unique values. Uses compact styling matching parameter form manager.

Signals:

filter_changed: Emitted when filter selection changes

filter_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__(column_name: str, unique_values: List[str], color_scheme: ColorScheme | None = None, parent=None)[source]

Initialize column filter widget.

Parameters:
  • column_name – Name of the column being filtered

  • unique_values – List of unique values in this column

  • color_scheme – Color scheme for styling

  • parent – Parent widget

select_all(block_signals: bool = False)[source]

Select all checkboxes.

Parameters:

block_signals – If True, block signals while updating checkboxes

select_none(block_signals: bool = False)[source]

Deselect all checkboxes.

Parameters:

block_signals – If True, block signals while updating checkboxes

get_selected_values() Set[str][source]

Get set of selected values.

set_selected_values(values: Set[str], block_signals: bool = False)[source]

Set which values are selected.

Parameters:
  • values – Set of values to select

  • block_signals – If True, block signals while updating checkboxes to prevent loops

class pyqt_reactive.widgets.shared.column_filter_widget.MultiColumnFilterPanel(color_scheme: ColorScheme | None = None, parent=None)[source]

Panel containing filters for multiple columns with resizable splitters.

Provides column-based filtering with AND logic across columns. Each filter can be resized independently using vertical splitters.

Signals:

filters_changed: Emitted when any filter changes

filters_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__(color_scheme: ColorScheme | None = None, parent=None)[source]

Initialize multi-column filter panel.

column_filters: Dict[str, ColumnFilterWidget]
resizeEvent(event)[source]

Handle resize to update splitter width.

showEvent(event)[source]

Handle show event to ensure proper initial sizing.

add_column_filter(column_name: str, unique_values: List[str])[source]

Add a filter for a column.

Parameters:
  • column_name – Name of the column

  • unique_values – List of unique values in this column

remove_column_filter(column_name: str)[source]

Remove a column filter.

clear_all_filters()[source]

Remove all column filters.

get_active_filters() Dict[str, Set[str]][source]

Get active filters for all columns.

Returns:

Dictionary mapping column name to set of selected values. Only includes columns where not all values are selected.

apply_filters(data: List[Dict], column_key_map: Dict[str, str] | None = None) List[Dict][source]

Apply filters to a list of data dictionaries.

Parameters:
  • data – List of dictionaries to filter

  • column_key_map – Optional mapping from display column names to data keys (e.g., {“Well”: “well”, “Channel”: “channel”})

Returns:

Filtered list of dictionaries

reset_all_filters()[source]

Reset all filters to select all values.