StringFilter

class StringFilter(**properties: Any)

Superclasses: Filter, Object

Constructors:

StringFilter(**properties)
new(expression:Gtk.Expression=None) -> Gtk.StringFilter

Constructors

class StringFilter
classmethod new(expression: Expression | None = None) StringFilter

Creates a new string filter.

You will want to set up the filter by providing a string to search for and by providing a property to look up on the item.

Parameters:

expression – The expression to evaluate

Methods

class StringFilter
get_expression() Expression | None

Gets the expression that the string filter uses to obtain strings from items.

get_ignore_case() bool

Returns whether the filter ignores case differences.

get_match_mode() StringFilterMatchMode

Returns the match mode that the filter is using.

Gets the search term.

set_expression(expression: Expression | None = None) None

Sets the expression that the string filter uses to obtain strings from items.

The expression must have a value type of str.

Parameters:

expression – a GtkExpression

set_ignore_case(ignore_case: bool) None

Sets whether the filter ignores case differences.

Parameters:

ignore_caseTrue to ignore case

set_match_mode(mode: StringFilterMatchMode) None

Sets the match mode for the filter.

Parameters:

mode – the new match mode

Sets the string to search for.

Parameters:

search – The string to search for or None to clear the search

Properties

class StringFilter
props.expression: Expression

The expression to evaluate on item to get a string to compare with.

props.ignore_case: bool

If matching is case sensitive.

props.match_mode: StringFilterMatchMode

If exact matches are necessary or if substrings are allowed.

props.search: str

The search term.