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
|
Filter widget for a single column showing checkboxes for unique values. |
|
Panel containing filters for multiple columns with resizable splitters. |
|
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.
- 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
- 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]
- 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
- 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