gtk.slice_list_model
Module for [SliceListModel] class
Types 3
classSliceListModel : gobject.object.ObjectWrap, gio.list_model.ListModel, gtk.section_model.SectionModel
gtk.slice_list_model.SliceListModel is a list model that presents a slice of another model.
This is useful when implementing paging by setting the size to the number of elements per page and updating the offset whenever a different page is opened.
gtk.slice_list_model.SliceListModel passes through sections from the underlying model.
Methods
SliceListModelGidBuilder builder() static nothrowGet builder for [gtk.slice_list_model.SliceListModel] Returns: New builder objectgobject.types.GType itemType() @property nothrowGet `itemType` property. Returns: The type of items. See [gio.list_model.ListModel.getItemType].gio.list_model.ListModel model() @property nothrowGet `model` property. Returns: Child model to take slice from.void model(gio.list_model.ListModel propval) @property nothrowSet `model` property. Params: propval = Child model to take slice from.uint nItems() @property nothrowGet `nItems` property. Returns: The number of items. See [gio.list_model.ListModel.getNItems].void offset(uint propval) @property nothrowSet `offset` property. Params: propval = Offset of slice.void size(uint propval) @property nothrowSet `size` property. Params: propval = Maximum size of slice.gio.list_model.ListModel getModel() nothrowGets the model that is currently being used or null if none. Returns: The model in useuint getOffset() nothrowGets the offset set via [gtk.slice_list_model.SliceListModel.setOffset]. Returns: The offsetuint getSize() nothrowGets the size set via [gtk.slice_list_model.SliceListModel.setSize]. Returns: The sizeConstructors
this(gio.list_model.ListModel model, uint offset, uint size)Creates a new slice model.classSliceListModelGidBuilderImpl(T) : gobject.object.ObjectWrapGidBuilderImpl!T, gio.list_model.ListModelGidBuilderImpl!T, gtk.section_model.SectionModelGidBuilderImpl!T
Fluent builder implementation template for gtk.slice_list_model.SliceListModel
Methods
T model(gio.list_model.ListModel propval) nothrowSet `model` property. Params: propval = Child model to take slice from. Returns: Builder instance for fluent chainingT offset(uint propval) nothrowSet `offset` property. Params: propval = Offset of slice. Returns: Builder instance for fluent chainingT size(uint propval) nothrowSet `size` property. Params: propval = Maximum size of slice. Returns: Builder instance for fluent chainingFluent builder for gtk.slice_list_model.SliceListModel
Methods