BoolFilter#

class BoolFilter(**properties: Any)#

Superclasses: Filter, Object

Evaluates a boolean expression to determine whether to include items.

Constructors#

class BoolFilter
classmethod new(expression: Expression | None = None) BoolFilter#

Creates a new bool filter.

Parameters:

expression – the expression to evaluate

Methods#

class BoolFilter
get_expression() Expression | None#

Gets the expression that the filter evaluates for each item.

get_invert() bool#

Returns whether the filter inverts the expression.

set_expression(expression: Expression | None = None) None#

Sets the expression that the filter uses to check if items should be filtered.

The expression must have a value type of G_TYPE_BOOLEAN.

Parameters:

expression – the expression

set_invert(invert: bool) None#

Sets whether the filter should invert the expression.

Parameters:

invert – true to invert

Properties#

class BoolFilter
props.expression: Expression#

The boolean expression to evaluate on each item.

props.invert: bool#

If the expression result should be inverted.