Base class for all filters.
Abstract base class for all filters.
filter(widget, parent, nodes)¶
Filters a list of nodes.
‘widget’is the widget that we are filtering nodes for. ‘parent’is the parent node. ‘nodes’ is the list of nodes to filter.
Returns a list containing only those nodes for which ‘select’ returns True.
select(widget, parent, node)¶
Returns True if the node is ‘allowed’ (ie. NOT filtered).
‘widget’ is the widget that we are filtering nodes for. ‘parent’ is the parent node. ‘node’ is the node to select.
By default we return True.
Is the filter affected by changes to a node’s trait?
‘node’ is the node. ‘trait_name’ is the name of the trait.
Returns True if the filter would be affected by changes to the trait named ‘trait_name’ on the specified node.
By default we return False.