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
SliceListModel self()Returns `this`, for use in `with` statements.SliceListModelGidBuilder builder()Get builder for [gtk.slicelistmodel.SliceListModel] Returns: New builder objectgobject.types.GType itemType() @propertyGet `itemType` property. Returns: The type of items. See [gio.list_model.ListModel.getItemType].gio.list_model.ListModel model() @propertyGet `model` property. Returns: Child model to take slice from.void model(gio.list_model.ListModel propval) @propertySet `model` property. Params: propval = Child model to take slice from.uint nItems() @propertyGet `nItems` property. Returns: The number of items. See [gio.list_model.ListModel.getNItems].gio.list_model.ListModel getModel()Gets the model that is currently being used or null if none. Returns: The model in useuint getOffset()Gets the offset set via [gtk.slicelistmodel.SliceListModel.setOffset]. Returns: The offsetuint getSize()Gets the size set via [gtk.slicelistmodel.SliceListModel.setSize]. Returns: The sizevoid setModel(gio.list_model.ListModel model = null)Sets the model to show a slice of.void setOffset(uint offset)Sets the offset into the original model for this slice.void setSize(uint size)Sets the maximum size. self will never have more items than size.Constructors
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
Methods
T model(gio.list_model.ListModel propval)Set `model` property. Params: propval = Child model to take slice from. Returns: Builder instance for fluent chainingT offset(uint propval)Set `offset` property. Params: propval = Offset of slice. Returns: Builder instance for fluent chainingT size(uint propval)Set `size` property. Params: propval = Maximum size of slice. Returns: Builder instance for fluent chainingFluent builder for [gtk.slice_list_model.SliceListModel]
Methods