Adw.EnumListModel

g Adw.EnumListModel Adw.EnumListModel GObject.GInterface GObject.GInterface Gio.ListModel Gio.ListModel GObject.GInterface->Gio.ListModel GObject.Object GObject.Object GObject.Object->Adw.EnumListModel Gio.ListModel->Adw.EnumListModel

Subclasses:

None

Methods

Inherited:

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

Structs:

GObject.ObjectClass (5)

class

new (enum_type)

find_position (value)

get_enum_type ()

Virtual Methods

Inherited:

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

Properties

Name

Type

Flags

Short Description

enum-type

GObject.GType

r/w/co

Signals

Inherited:

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

Fields

Inherited:

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

Class Details

class Adw.EnumListModel(**kwargs)
Bases:

GObject.Object, Gio.ListModel

Abstract:

No

Structure:

Adw.EnumListModelClass

A [iface`Gio`.ListModel] representing values of a given enum.

AdwEnumListModel contains objects of type [class`EnumListItem`].

classmethod new(enum_type)
Parameters:

enum_type (GObject.GType) – the type of the enum to construct the model from

Returns:

the newly created AdwEnumListModel

Return type:

Adw.EnumListModel

Creates a new AdwEnumListModel for enum_type.

find_position(value)
Parameters:

value (int) – an enum value

Returns:

the position of the value

Return type:

int

Finds the position of a given enum value in self.

If the value is not found, GTK_INVALID_LIST_POSITION is returned.

get_enum_type()
Returns:

the enum type

Return type:

GObject.GType

Gets the type of the enum represented by self.

Property Details

Adw.EnumListModel.props.enum_type
Name:

enum-type

Type:

GObject.GType

Default Value:

<GType GEnum>

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The type of the enum represented by the model.