Gtk.SelectionFilterModel

g GObject.GInterface GObject.GInterface Gio.ListModel Gio.ListModel GObject.GInterface->Gio.ListModel GObject.Object GObject.Object Gtk.SelectionFilterModel Gtk.SelectionFilterModel GObject.Object->Gtk.SelectionFilterModel Gio.ListModel->Gtk.SelectionFilterModel

Subclasses:

None

Methods

Inherited:

GObject.Object (37), Gio.ListModel (4)

Structs:

GObject.ObjectClass (5)

class

new (model)

get_model ()

set_model (model)

Virtual Methods

Inherited:

GObject.Object (7), Gio.ListModel (3)

Properties

Name

Type

Flags

Short Description

item-type

GObject.GType

r

model

Gtk.SelectionModel

r/w/en

n-items

int

r

Signals

Inherited:

GObject.Object (1), Gio.ListModel (1)

Fields

Inherited:

GObject.Object (1), Gio.ListModel (1)

Class Details

class Gtk.SelectionFilterModel(**kwargs)
Bases:

GObject.Object, Gio.ListModel

Abstract:

No

Structure:

Gtk.SelectionFilterModelClass

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

classmethod new(model)[source]
Parameters:

model (Gtk.SelectionModel or None) – the selection model to filter

Returns:

a new GtkSelectionFilterModel

Return type:

Gtk.SelectionFilterModel

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

get_model()[source]
Returns:

The model that gets filtered

Return type:

Gtk.SelectionModel or None

Gets the model currently filtered or None if none.

set_model(model)[source]
Parameters:

model (Gtk.SelectionModel or None) – The model to be filtered

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.

Property Details

Gtk.SelectionFilterModel.props.item_type
Name:

item-type

Type:

GObject.GType

Default Value:

<GType GObject>

Flags:

READABLE

The type of items. See [method`Gio`.ListModel.get_item_type].

New in version 4.8.

Gtk.SelectionFilterModel.props.model
Name:

model

Type:

Gtk.SelectionModel

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The model being filtered.

Gtk.SelectionFilterModel.props.n_items
Name:

n-items

Type:

int

Default Value:

0

Flags:

READABLE

The number of items. See [method`Gio`.ListModel.get_n_items].

New in version 4.8.