EnumListModel#

class EnumListModel(**properties: Any)#

Superclasses: Object

Implemented Interfaces: ListModel

A ListModel representing values of a given enum.

AdwEnumListModel contains objects of type EnumListItem.

Constructors#

class EnumListModel
classmethod new(enum_type: GType) EnumListModel#

Creates a new AdwEnumListModel for enum_type.

Parameters:

enum_type – the type of the enum to construct the model from

Methods#

class EnumListModel
find_position(value: int) int#

Finds the position of a given enum value in self.

If the value is not found, INVALID_LIST_POSITION is returned.

Parameters:

value – an enum value

get_enum_type() GType#

Gets the type of the enum represented by self.

Properties#

class EnumListModel
props.enum_type: GType#

The type of the enum represented by the model.

props.item_type: GType#

The type of the items. See get_item_type.

Added in version 1.9.

props.n_items: int#

The number of items. See get_n_items.

Added in version 1.9.