gtk.filter_list_model

Module for [FilterListModel] class

Types 3

[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
GType _gType() @property
FilterListModel self()Returns `this`, for use in `with` statements.
FilterListModelGidBuilder builder()Get builder for [gtk.filterlistmodel.FilterListModel] Returns: New builder object
gtk.filter.Filter filter() @propertyGet `filter` property. Returns: The filter for this model.
void 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].
gio.list_model.ListModel model() @propertyGet `model` property. Returns: The model being filtered.
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].
uint pending() @propertyGet `pending` property. Returns: Number of items not yet filtered.
gtk.filter.Filter getFilter()Gets the [gtk.filter.Filter] currently set on self. Returns: The filter currently in use
bool 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 filtered
uint 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(void * ptr, Flag!"Take" take)
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.
Methods
T filter(gtk.filter.Filter propval)Set `filter` property. Params: propval = The filter for this model. Returns: Builder instance for fluent chaining
T incremental(bool propval)Set `incremental` property. Params: propval = If the model should filter items incrementally. Returns: Builder instance for fluent chaining
T model(gio.list_model.ListModel propval)Set `model` property. Params: propval = The model being filtered. Returns: Builder instance for fluent chaining

Fluent builder for [gtk.filter_list_model.FilterListModel]