Trait gtk4::prelude::FilterExt

source ·
pub trait FilterExt: 'static {
    fn changed(&self, change: FilterChange);
    fn strictness(&self) -> FilterMatch;
    fn match_(&self, item: &impl IsA<Object>) -> bool;
    fn connect_changed<F: Fn(&Self, FilterChange) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }
Expand description

Required Methods§

Notifies all users of the filter that it has changed.

This emits the signal::Filter::changed signal. Users of the filter should then check items again via match_().

Depending on the @change parameter, not all items need to be changed, but only some. Refer to the FilterChange documentation for details.

This function is intended for implementors of Filter subclasses and should not be called from other functions.

change

How the filter changed

Gets the known strictness of @filters.

If the strictness is not known, FilterMatch::Some is returned.

This value may change after emission of the signal::Filter::changed signal.

This function is meant purely for optimization purposes, filters can choose to omit implementing it, but FilterListModel uses it.

Returns

the strictness of @self

Emitted whenever the filter changed.

Users of the filter should then check items again via match_().

FilterListModel handles this signal automatically.

Depending on the @change parameter, not all items need to be checked, but only some. Refer to the FilterChange documentation for details.

change

how the filter changed

Implementors§