NaviNIBS.Navigator.Model.GenericCollection module¶
- class NaviNIBS.Navigator.Model.GenericCollection.GenericCollectionDictItem(key)[source]¶
Bases:
ABC,Generic[K]- Parameters:
_key
-
sigKeyAboutToChange:
NaviNIBS.util.Signaler.Signal¶
-
sigKeyChanged:
NaviNIBS.util.Signaler.Signal¶
-
sigItemAboutToChange:
NaviNIBS.util.Signaler.Signal¶ This signal includes the key of the item, and optionally a list of keys of attributes about to change; if second arg is None, all attributes should be assumed to be about to change.
Not emitted when key changed (use sigKeyAboutToChange instead!)
-
sigItemChanged:
NaviNIBS.util.Signaler.Signal¶ This signal includes the key of the item, and optionally a list of keys of changed attributes; if second arg is None, all attributes should be assumed to have changed.
Not emitted when key changed (use sigKeyChanged instead!)
- property key¶
- class NaviNIBS.Navigator.Model.GenericCollection.GenericCollection(items=NOTHING)[source]¶
Bases:
ABC,Generic[K,CI]Base class to implement collection behavior and signaling for various session model components
- Parameters:
_items
-
sigItemsAboutToChange:
NaviNIBS.util.Signaler.Signal[list[~K],typing.Optional[list[str]]]¶ This signal includes list of keys of collection items about to change, and optionally a list of keys of attributes about to change; if second arg is None, all attributes should be assumed to be about to change.
-
sigItemsChanged:
NaviNIBS.util.Signaler.Signal[list[~K],typing.Optional[list[str]]]¶ This signal includes list of keys of changed collection items, and optionally a list of keys of changed attributes; if second arg is None, all attributes should be assumed to have changed.
-
sigItemKeyAboutToChange:
NaviNIBS.util.Signaler.Signal¶
-
sigItemKeyChanged:
NaviNIBS.util.Signaler.Signal¶ Emitted in addition to sigItemsAboutToChange and sigItemsChanged specifically when an item key changes.
This is because when a key does change, everything else about a item may have changed, so these other signals don’t include a list of attributes indicating the source of the change.
- setAttribForItems(keys, attribsAndValues)[source]¶
Change an attribute for multiple items at once, without signaling separately for each item. E.g. for changing visibility of multiple targets simultaneously.
- Parameters:
keys (
Sequence[~K]) – Identifying keys of items to changeattribsAndValues (
dict[str,Sequence[Any]]) – mapping of attribute -> list of new values, where this list is of the same length as specified keys.
- Return type:
None- Returns:
None