Dee.FilterModel

g Dee.FilterModel Dee.FilterModel Dee.Model Dee.Model Dee.SerializableModel Dee.SerializableModel Dee.Model->Dee.SerializableModel Dee.ProxyModel Dee.ProxyModel Dee.ProxyModel->Dee.FilterModel Dee.Serializable Dee.Serializable Dee.Serializable->Dee.SerializableModel Dee.SerializableModel->Dee.ProxyModel GObject.GInterface GObject.GInterface GObject.GInterface->Dee.Model GObject.GInterface->Dee.Serializable GObject.Object GObject.Object GObject.Object->Dee.SerializableModel

Subclasses:

None

Methods

Inherited:

Dee.SerializableModel (3), GObject.Object (37), Dee.Model (48), Dee.Serializable (4)

Structs:

GObject.ObjectClass (5)

class

new (orig_model, filter)

append_iter (iter)

contains (iter)

insert_iter (iter, pos)

insert_iter_before (iter, pos)

insert_iter_with_original_order (iter)

prepend_iter (iter)

Virtual Methods

Inherited:

GObject.Object (7), Dee.Model (50), Dee.Serializable (1)

Properties

Inherited:

Dee.ProxyModel (3)

Name

Type

Flags

Short Description

filter

int

r/w/co

Filtering rules applied to the original model

Signals

Inherited:

GObject.Object (1), Dee.Model (5)

Fields

Inherited:

GObject.Object (1), Dee.Model (5)

Name

Type

Access

Description

parent

Dee.ProxyModel

r

priv

Dee.FilterModelPrivate

r

Class Details

class Dee.FilterModel(**kwargs)
Bases:

Dee.ProxyModel

Abstract:

No

Structure:

Dee.FilterModelClass

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 the Dee.ProxyModel :back-end property

  • filter (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 with GObject.Object.unref().

Return type:

Dee.FilterModel

append_iter(iter)
Parameters:

iter (Dee.ModelIter) –

Returns:

Always returns iter

Return type:

Dee.ModelIter

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 or Dee.FilterMapNotify methods.

contains(iter)
Parameters:

iter (Dee.ModelIter) – The Dee.ModelIter to check

Returns:

True if and only if iter is contained in self.

Return type:

bool

Check if iter from the back end model is mapped in self.

insert_iter(iter, pos)
Parameters:
Returns:

Always returns iter

Return type:

Dee.ModelIter

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 or Dee.FilterMapNotify methods.

insert_iter_before(iter, pos)
Parameters:
Returns:

Always returns iter

Return type:

Dee.ModelIter

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 or Dee.FilterMapNotify methods.

insert_iter_with_original_order(iter)
Parameters:

iter (Dee.ModelIter) – Iterator

Returns:

Always returns iter

Return type:

Dee.ModelIter

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 of Dee.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:

Dee.ModelIter

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 or Dee.FilterMapNotify methods.

Property Details

Dee.FilterModel.props.filter
Name:

filter

Type:

int

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Property holding the Dee.Filter used to filter the model defined in the Dee.FilterModel :back-end property.