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 _getGType() static nothrow
GType _gType() @property nothrow
FilterListModel self() nothrowReturns `this`, for use in `with` statements.
FilterListModelGidBuilder builder() static nothrowGet builder for [gtk.filter_list_model.FilterListModel] Returns: New builder object
gtk.filter.Filter filter() @property nothrowGet `filter` property. Returns: The filter for this model.
void filter(gtk.filter.Filter propval) @property nothrowSet `filter` property. Params: propval = The filter for this model.
bool incremental() @property nothrowGet `incremental` property. Returns: If the model should filter items incrementally.
void incremental(bool propval) @property nothrowSet `incremental` property. Params: propval = If the model should filter items incrementally.
gobject.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: The model being filtered.
void model(gio.list_model.ListModel propval) @property nothrowSet `model` property. Params: propval = The model being filtered.
uint nItems() @property nothrowGet `nItems` property. Returns: The number of items. See [gio.list_model.ListModel.getNItems].
uint pending() @property nothrowGet `pending` property. Returns: Number of items not yet filtered.
gtk.filter.Filter getFilter() nothrowGets the [gtk.filter.Filter] currently set on self. Returns: The filter currently in use
bool getIncremental() nothrowReturns whether incremental filtering is enabled.
gio.list_model.ListModel getModel() nothrowGets the model currently filtered or null if none. Returns: The model that gets filtered
uint getPending() nothrowReturns the number of items that have not been filtered yet.
void setFilter(gtk.filter.Filter filter = null) nothrowSets the filter used to filter items.
void setIncremental(bool incremental) nothrowSets the filter model to do an incremental sort.
void setModel(gio.list_model.ListModel model = null) nothrowSets 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.filter_list_model.FilterListModel] that will filter model using the given filter.

Fluent builder implementation template for gtk.filter_list_model.FilterListModel

Methods
T filter(gtk.filter.Filter propval) nothrowSet `filter` property. Params: propval = The filter for this model. Returns: Builder instance for fluent chaining
T incremental(bool propval) nothrowSet `incremental` property. Params: propval = If the model should filter items incrementally. Returns: Builder instance for fluent chaining
T model(gio.list_model.ListModel propval) nothrowSet `model` property. Params: propval = The model being filtered. Returns: Builder instance for fluent chaining
Methods
FilterListModel build() nothrowCreate object from builder. Returns: New object