pynaviz.qt.widget_list_selection#
Classes
|
|
|
A model to handle the list of channels with checkboxes. |
A QListView that allows dynamic selection of multiple items with checkboxes. |
|
|
Dialog wrapping |
|
A tree widget showing channels nested under their group labels. |
- class pynaviz.qt.widget_list_selection.ChannelList(model, parent=None)[source]#
Bases:
QDialog- Parameters:
model (ChannelListModel)
parent (QWidget | None)
- checkStateChanged#
A dialog listing selectable channels (e.g., for visibility toggling).
- Parameters:
model (
ChannelListModel) – Data model that holds the list of channel states.parent (
QWidget, optional) – Parent widget.
- staticMetaObject = PySide6.QtCore.QMetaObject("ChannelList" inherits "QDialog": Methods: #41 type=Signal, signature=checkStateChanged(int), parameters=int )#
- class pynaviz.qt.widget_list_selection.ChannelListModel(data)[source]#
Bases:
QAbstractListModelA model to handle the list of channels with checkboxes.
- Parameters:
data (Any)
- checkStateChanged#
- setData(index, value, role)[source]#
Write data to the model.
- Parameters:
index (
QModelIndex) – The index of the item to modify.value (
Any) – The new value to set.role (
Qt.ItemDataRole) – The role of the data to set.
- staticMetaObject = PySide6.QtCore.QMetaObject("ChannelListModel" inherits "QAbstractListModel": Methods: #76 type=Signal, signature=checkStateChanged(int), parameters=int )#
- class pynaviz.qt.widget_list_selection.DynamicSelectionListView[source]#
Bases:
QListViewA QListView that allows dynamic selection of multiple items with checkboxes.
- staticMetaObject = PySide6.QtCore.QMetaObject("DynamicSelectionListView" inherits "QListView": )#
- class pynaviz.qt.widget_list_selection.GroupedChannelList(channel_names, groups_mapping, order_mapping, visibility_mapping, parent=None)[source]#
Bases:
QDialogDialog wrapping
GroupedChannelTreefor group-by channel visibility.Emits
visibilityChanged(np.ndarray)— a bool array in_manager.indexorder — whenever any checkbox in the tree changes.- Parameters:
channel_names (
list) – Ordered channel keys matching_manager.index.groups_mapping (
dict) –{channel_key: group_label_str}.order_mapping (
dictorNone) –{channel_key: int}sort rank, orNoneif not sorted.visibility_mapping (
dict) –{channel_key: bool}initial visibility.parent (
QWidget, optional)
- staticMetaObject = PySide6.QtCore.QMetaObject("GroupedChannelList" inherits "QDialog": Methods: #41 type=Signal, signature=visibilityChanged(PyObject), parameters=PyObject )#
- visibilityChanged#
- class pynaviz.qt.widget_list_selection.GroupedChannelTree(channel_names, groups_mapping, order_mapping, visibility_mapping, parent=None)[source]#
Bases:
QTreeWidgetA tree widget showing channels nested under their group labels.
Top-level items represent groups (tristate checkboxes); leaf items represent individual channels. Toggling a group propagates to all its children; toggling a leaf updates the parent’s tristate state.
- Parameters:
channel_names (
list) – Ordered channel keys matching_manager.index.groups_mapping (
dict) –{channel_key: group_label_str}— the metadata value used to group.order_mapping (
dictorNone) –{channel_key: int}sort rank from_manager.data["order"]. When provided, channels within each group are shown in rank order.visibility_mapping (
dict) –{channel_key: bool}initial visibility state.parent (QWidget | None)
- staticMetaObject = PySide6.QtCore.QMetaObject("GroupedChannelTree" inherits "QTreeWidget": Methods: #103 type=Signal, signature=visibilityChanged(PyObject), parameters=PyObject )#
- visibilityChanged#