SelectionFilterModel#

class SelectionFilterModel(**properties: Any)#

Superclasses: Object

Implemented Interfaces: ListModel

GtkSelectionFilterModel is a list model that presents the selection from a GtkSelectionModel.

Constructors#

class SelectionFilterModel
classmethod new(model: SelectionModel | None = None) SelectionFilterModel#

Creates a new GtkSelectionFilterModel that will include the selected items from the underlying selection model.

Parameters:

model – the selection model to filter

Methods#

class SelectionFilterModel
get_model() SelectionModel | None#

Gets the model currently filtered or None if none.

set_model(model: SelectionModel | None = None) None#

Sets the model to be filtered.

Note that GTK makes no effort to ensure that model conforms to the item type of self. It assumes that the caller knows what they are doing and have set up an appropriate filter to ensure that item types match.

Parameters:

model – The model to be filtered

Properties#

class SelectionFilterModel
props.item_type: type#

The type of the None singleton.

Added in version 4.8.

props.model: SelectionModel#

The type of the None singleton.

props.n_items: int#

The type of the None singleton.

Added in version 4.8.