RB.DisplayPageModel

g GObject.GInterface GObject.GInterface Gtk.TreeDragSource Gtk.TreeDragSource GObject.GInterface->Gtk.TreeDragSource Gtk.TreeModel Gtk.TreeModel GObject.GInterface->Gtk.TreeModel GObject.Object GObject.Object Gtk.TreeModelFilter Gtk.TreeModelFilter GObject.Object->Gtk.TreeModelFilter Gtk.TreeDragSource->Gtk.TreeModelFilter Gtk.TreeModel->Gtk.TreeModelFilter RB.DisplayPageModel RB.DisplayPageModel Gtk.TreeModelFilter->RB.DisplayPageModel

Subclasses:

None

Methods

Inherited:

Gtk.TreeModelFilter (11), GObject.Object (37), Gtk.TreeDragSource (3), Gtk.TreeModel (28)

Structs:

GObject.ObjectClass (5)

class

new ()

add_page (page, parent)

find_page (page, iter)

find_page_full (page, iter)

remove_page (page)

set_dnd_targets (treeview)

set_playing_source (source)

Virtual Methods

Inherited:

Gtk.TreeModelFilter (2), GObject.Object (7), Gtk.TreeDragSource (3), Gtk.TreeModel (19)

do_drop_received (target, pos, data)

do_page_inserted (page, iter)

Properties

Inherited:

Gtk.TreeModelFilter (2)

Signals

Inherited:

GObject.Object (1), Gtk.TreeModel (5)

Name

Short Description

drop-received

Emitted when a drag and drop operation to the display page tree completes.

page-inserted

Emitted when a new page is inserted into the model.

Fields

Inherited:

GObject.Object (1), Gtk.TreeModel (5)

Name

Type

Access

Description

parent

Gtk.TreeModelFilter

r

Class Details

class RB.DisplayPageModel(**kwargs)
Bases:

Gtk.TreeModelFilter

Abstract:

No

Structure:

RB.DisplayPageModelClass

classmethod new()
Returns:

the RB.DisplayPageModel

Return type:

RB.DisplayPageModel

This constructs both the Gtk.TreeStore holding the display page data and the filter model that hides invisible pages.

add_page(page, parent)
Parameters:

Adds a page to the model, either below a specified page (if it’s a source or something else) or at the top level (if it’s a group)

find_page(page, iter)
Parameters:
Returns:

True if the page was found

Return type:

bool

Finds a Gtk.TreeIter for a specified page in the model. This will only find pages that are currently visible. The returned Gtk.TreeIter can be used with the RB.DisplayPageModel.

find_page_full(page, iter)
Parameters:
Returns:

True if the page was found

Return type:

bool

Finds a Gtk.TreeIter for a specified page in the model. This function searches the full page model, so it will find pages that are not currently visible, and the returned iterator can only be used with the child model (see Gtk.TreeModelFilter.get_model).

remove_page(page)
Parameters:

page (RB.DisplayPage) – the RB.DisplayPage to remove

Removes a page from the model.

set_dnd_targets(treeview)
Parameters:

treeview (Gtk.TreeView) – the sourcel ist Gtk.TreeView

Sets up the drag and drop targets for the display page tree.

set_playing_source(source)
Parameters:

source (RB.DisplayPage) – the new playing RB.Source (as a RB.DisplayPage)

Updates the model with the new playing source.

do_drop_received(target, pos, data) virtual
Parameters:
do_page_inserted(page, iter) virtual
Parameters:

Signal Details

RB.DisplayPageModel.signals.drop_received(display_page_model, target, pos, data)
Signal Name:

drop-received

Flags:

RUN_LAST

Parameters:

Emitted when a drag and drop operation to the display page tree completes.

RB.DisplayPageModel.signals.page_inserted(display_page_model, page, iter)
Signal Name:

page-inserted

Flags:

RUN_LAST

Parameters:

Emitted when a new page is inserted into the model. Use this instead of Gtk.TreeModel ::row-inserted as this doesn’t get complicated by visibility filtering.