Gtk.FlattenListModel¶
- Subclasses:
None
Methods¶
- Inherited:
GObject.Object (37), Gio.ListModel (4), Gtk.SectionModel (2)
- Structs:
class |
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
|||
r/w/en |
|||
r |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Gtk.FlattenListModel(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
GtkFlattenListModel
is a list model that concatenates other list models.GtkFlattenListModel
takes a list model containing list models, and flattens it into a single model. Each list model becomes a section in the single model.- classmethod new(model)[source]¶
- Parameters:
model (
Gio.ListModel
orNone
) – the model to be flattened- Returns:
a new
GtkFlattenListModel
- Return type:
Creates a new
GtkFlattenListModel
that flattens list.
- get_model()[source]¶
- Returns:
The model flattened by self
- Return type:
Gets the model set via
Gtk.FlattenListModel.set_model
().
- get_model_for_item(position)[source]¶
- Parameters:
position (
int
) – a position- Returns:
the model containing the item at position
- Return type:
Returns the model containing the item at the given position.
- set_model(model)[source]¶
- Parameters:
model (
Gio.ListModel
orNone
) – the new model
Sets a new model to be flattened.
Property Details¶
- Gtk.FlattenListModel.props.item_type¶
- Name:
item-type
- Type:
- Default Value:
<GType GObject>
- Flags:
The type of items. See [method`Gio`.ListModel.get_item_type].
New in version 4.8.
- Gtk.FlattenListModel.props.model¶
- Name:
model
- Type:
- Default Value:
- Flags:
The model being flattened.