NaviNIBS.Navigator.Model.GenericCollection module

Bases: ABC, Generic[K]

Parameters:

_key

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!)

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!)

Return type:

dict[str, Any]

Bases: ABC, Generic[K, CI]

Base class to implement collection behavior and signaling for various session model components

Parameters:

_items

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.

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.

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.

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 change

  • attribsAndValues (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

Return type:

list[dict[str, Any]]

Return type:

~C