Gtk.NoSelection

g GObject.GInterface GObject.GInterface Gio.ListModel Gio.ListModel GObject.GInterface->Gio.ListModel Gtk.SectionModel Gtk.SectionModel GObject.GInterface->Gtk.SectionModel Gtk.SelectionModel Gtk.SelectionModel GObject.GInterface->Gtk.SelectionModel GObject.Object GObject.Object Gtk.NoSelection Gtk.NoSelection GObject.Object->Gtk.NoSelection Gio.ListModel->Gtk.NoSelection Gtk.SectionModel->Gtk.NoSelection Gtk.SelectionModel->Gtk.NoSelection

Subclasses:

None

Methods

Inherited:

GObject.Object (37), Gio.ListModel (4), Gtk.SectionModel (2), Gtk.SelectionModel (11)

Structs:

GObject.ObjectClass (5)

class

new (model)

get_model ()

set_model (model)

Virtual Methods

Inherited:

GObject.Object (7), Gio.ListModel (3), Gtk.SectionModel (1), Gtk.SelectionModel (9)

Properties

Name

Type

Flags

Short Description

item-type

GObject.GType

r

model

Gio.ListModel

r/w/en

n-items

int

r

Signals

Inherited:

GObject.Object (1), Gio.ListModel (1), Gtk.SectionModel (1), Gtk.SelectionModel (1)

Fields

Inherited:

GObject.Object (1), Gio.ListModel (1), Gtk.SectionModel (1), Gtk.SelectionModel (1)

Class Details

class Gtk.NoSelection(**kwargs)
Bases:

GObject.Object, Gio.ListModel, Gtk.SectionModel, Gtk.SelectionModel

Abstract:

No

Structure:

Gtk.NoSelectionClass

GtkNoSelection is a GtkSelectionModel that does not allow selecting anything.

This model is meant to be used as a simple wrapper around a GListModel when a GtkSelectionModel is required.

GtkNoSelection passes through sections from the underlying model.

classmethod new(model)[source]
Parameters:

model (Gio.ListModel or None) – the GListModel to manage

Returns:

a new GtkNoSelection

Return type:

Gtk.NoSelection

Creates a new selection to handle model.

get_model()[source]
Returns:

The model being wrapped

Return type:

Gio.ListModel or None

Gets the model that self is wrapping.

set_model(model)[source]
Parameters:

model (Gio.ListModel or None) – A GListModel to wrap

Sets the model that self should wrap.

If model is None, this model will be empty.

Property Details

Gtk.NoSelection.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.NoSelection.props.model
Name:

model

Type:

Gio.ListModel

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The model being managed.

Gtk.NoSelection.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.