pyface.filter module

Base class for all filters.

class pyface.filter.Filter[source]

Bases: traits.has_traits.HasPrivateTraits

Abstract base class for all filters.

filter(widget, parent, nodes)[source]

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)[source]

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_filter_trait(node, trait_name)[source]

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.