Trait gtk4::prelude::FilterExt [−][src]
pub trait FilterExt: 'static {
fn changed(&self, change: FilterChange);
fn strictness(&self) -> FilterMatch;
fn match_<P: IsA<Object>>(&self, item: &P) -> bool;
fn connect_changed<F: Fn(&Self, FilterChange) + 'static>(
&self,
f: F
) -> SignalHandlerId;
}
Expand description
Trait containing all Filter
methods.
Implementors
BoolFilter
, CustomFilter
, FileFilter
, Filter
, MultiFilter
, StringFilter
Required methods
fn changed(&self, change: FilterChange)
fn changed(&self, change: FilterChange)
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
fn strictness(&self) -> FilterMatch
fn strictness(&self) -> FilterMatch
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
fn connect_changed<F: Fn(&Self, FilterChange) + 'static>(
&self,
f: F
) -> SignalHandlerId
fn connect_changed<F: Fn(&Self, FilterChange) + 'static>(
&self,
f: F
) -> SignalHandlerId
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