gtk.filter_list_model
Module for [FilterListModel] class
Types 3
classFilterListModel : gobject.object.ObjectWrap, gio.list_model.ListModel, gtk.section_model.SectionModel
[gtk.filter_list_model.FilterListModel] is a list model that filters the elements of the underlying model according to a [gtk.filter.Filter].
It hides some elements from the other model according to criteria given by a [gtk.filter.Filter].
The model can be set up to do incremental filtering, so that filtering long lists doesn't block the UI. See [gtk.filter_list_model.FilterListModel.setIncremental] for details.
[gtk.filter_list_model.FilterListModel] passes through sections from the underlying model.
Methods
FilterListModel self()Returns `this`, for use in `with` statements.FilterListModelGidBuilder builder()Get builder for [gtk.filterlistmodel.FilterListModel] Returns: New builder objectvoid filter(gtk.filter.Filter propval) @propertySet `filter` property. Params: propval = The filter for this model.bool incremental() @propertyGet `incremental` property. Returns: If the model should filter items incrementally.void incremental(bool propval) @propertySet `incremental` property. Params: propval = If the model should filter items incrementally.gobject.types.GType itemType() @propertyGet `itemType` property. Returns: The type of items. See [gio.list_model.ListModel.getItemType].void model(gio.list_model.ListModel propval) @propertySet `model` property. Params: propval = The model being filtered.uint nItems() @propertyGet `nItems` property. Returns: The number of items. See [gio.list_model.ListModel.getNItems].gtk.filter.Filter getFilter()Gets the [gtk.filter.Filter] currently set on self. Returns: The filter currently in usebool getIncremental()Returns whether incremental filtering is enabled.gio.list_model.ListModel getModel()Gets the model currently filtered or null if none. Returns: The model that gets filtereduint getPending()Returns the number of items that have not been filtered yet.void setFilter(gtk.filter.Filter filter = null)Sets the filter used to filter items.void setIncremental(bool incremental)Sets the filter model to do an incremental sort.void setModel(gio.list_model.ListModel model = null)Sets the model to be filtered.Constructors
this(gio.list_model.ListModel model = null, gtk.filter.Filter filter = null)Creates a new [gtk.filterlistmodel.FilterListModel] that will filter model using the given filter.classFilterListModelGidBuilderImpl(T) : gobject.object.ObjectWrapGidBuilderImpl!T, gio.list_model.ListModelGidBuilderImpl!T, gtk.section_model.SectionModelGidBuilderImpl!T
Methods
T filter(gtk.filter.Filter propval)Set `filter` property. Params: propval = The filter for this model. Returns: Builder instance for fluent chainingT incremental(bool propval)Set `incremental` property. Params: propval = If the model should filter items incrementally. Returns: Builder instance for fluent chainingT model(gio.list_model.ListModel propval)Set `model` property. Params: propval = The model being filtered. Returns: Builder instance for fluent chainingFluent builder for [gtk.filter_list_model.FilterListModel]
Methods