Dee.FilterModel¶
- Subclasses:
None
Methods¶
- Inherited:
Dee.SerializableModel (3), GObject.Object (37), Dee.Model (48), Dee.Serializable (4)
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
Filtering rules applied to the original model |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
||
priv |
r |
Class Details¶
- class Dee.FilterModel(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
All fields in the
Dee.FilterModel
structure are private and should never be accessed directly- classmethod new(orig_model, filter)¶
- Parameters:
orig_model (
Dee.Model
) – The back end model. This will be set as theDee.ProxyModel
:back-end
propertyfilter (
Dee.Filter
) – Structure containing the logic used to create the filter model. The filter model will create it’s own copy of filter so unless filter is allocated statically or on the stack you need to free it after calling this method.
- Returns:
A newly allocated
Dee.FilterModel
. Free withGObject.Object.unref
().- Return type:
- append_iter(iter)¶
- Parameters:
iter (
Dee.ModelIter
) –- Returns:
Always returns iter
- Return type:
Includes iter from the back end model in the filtered model, appending it to the end of the filtered rows.
This method is usually called when implementing
Dee.FilterMapFunc
orDee.FilterMapNotify
methods.
- contains(iter)¶
- Parameters:
iter (
Dee.ModelIter
) – TheDee.ModelIter
to check- Returns:
True
if and only if iter is contained in self.- Return type:
Check if iter from the back end model is mapped in self.
- insert_iter(iter, pos)¶
- Parameters:
iter (
Dee.ModelIter
) –pos (
int
) –
- Returns:
Always returns iter
- Return type:
Includes iter from the back end model in the filtered model, inserting it at pos pushing other rows down.
This method is usually called when implementing
Dee.FilterMapFunc
orDee.FilterMapNotify
methods.
- insert_iter_before(iter, pos)¶
- Parameters:
iter (
Dee.ModelIter
) –pos (
Dee.ModelIter
) –
- Returns:
Always returns iter
- Return type:
Includes iter from the back end model in the filtered model, inserting it at the position before pos pushing other rows down.
This method is usually called when implementing
Dee.FilterMapFunc
orDee.FilterMapNotify
methods.
- insert_iter_with_original_order(iter)¶
- Parameters:
iter (
Dee.ModelIter
) – Iterator- Returns:
Always returns iter
- Return type:
Inserts iter in self in a way that is consistent with the ordering of the rows in the original
Dee.Model
behind self. THis method assumes that self is already ordered this way. If that’s not the case then this method has undefined behaviour.This method is mainly intended as a helper for
Dee.FilterMapNotify
functions ofDee.Filter
implementations that creates filter models sorted in accordance with the original models.
- prepend_iter(iter)¶
- Parameters:
iter (
Dee.ModelIter
) –- Returns:
Always returns iter
- Return type:
Includes iter from the back end model in the filtered model, prepending it to the beginning of the filtered rows.
This method is usually called when implementing
Dee.FilterMapFunc
orDee.FilterMapNotify
methods.
Property Details¶
- Dee.FilterModel.props.filter¶
- Name:
filter
- Type:
- Default Value:
- Flags:
Property holding the
Dee.Filter
used to filter the model defined in theDee.FilterModel
:back-end
property.