RB.DisplayPageModel¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.TreeModelFilter (11), GObject.Object (37), Gtk.TreeDragSource (3), Gtk.TreeModel (28)
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
|
|
|
Properties¶
- Inherited:
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emitted when a drag and drop operation to the display page tree completes. |
|
Emitted when a new page is inserted into the model. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class RB.DisplayPageModel(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new()¶
- Returns:
- Return type:
This constructs both the
Gtk.TreeStore
holding the display page data and the filter model that hides invisible pages.
- add_page(page, parent)¶
- Parameters:
page (
RB.DisplayPage
) – theRB.DisplayPage
to addparent (
RB.DisplayPage
) – the parent under which to add page
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:
page (
RB.DisplayPage
) – theRB.DisplayPage
to finditer (
Gtk.TreeIter
) – returns aGtk.TreeIter
for the page
- Returns:
True
if the page was found- Return type:
Finds a
Gtk.TreeIter
for a specified page in the model. This will only find pages that are currently visible. The returnedGtk.TreeIter
can be used with theRB.DisplayPageModel
.
- find_page_full(page, iter)¶
- Parameters:
page (
RB.DisplayPage
) – theRB.DisplayPage
to finditer (
Gtk.TreeIter
) – returns aGtk.TreeIter
for the page
- Returns:
True
if the page was found- Return type:
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 (seeGtk.TreeModelFilter.get_model
).
- remove_page(page)¶
- Parameters:
page (
RB.DisplayPage
) – theRB.DisplayPage
to remove
Removes a page from the model.
- set_dnd_targets(treeview)¶
- Parameters:
treeview (
Gtk.TreeView
) – the sourcel istGtk.TreeView
Sets up the drag and drop targets for the display page tree.
- set_playing_source(source)¶
- Parameters:
source (
RB.DisplayPage
) – the new playingRB.Source
(as aRB.DisplayPage
)
Updates the model with the new playing source.
- do_drop_received(target, pos, data) virtual¶
- Parameters:
target (
RB.DisplayPage
) –pos (
Gtk.TreeViewDropPosition
) –data (
Gtk.SelectionData
) –
- do_page_inserted(page, iter) virtual¶
- Parameters:
page (
RB.DisplayPage
) –iter (
Gtk.TreeIter
) –
Signal Details¶
- RB.DisplayPageModel.signals.drop_received(display_page_model, target, pos, data)¶
- Signal Name:
drop-received
- Flags:
- Parameters:
display_page_model (
RB.DisplayPageModel
) – The object which received the signaltarget (
RB.DisplayPage
) – theRB.Source
receiving the droppos (
int
) – the drop position
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:
- Parameters:
display_page_model (
RB.DisplayPageModel
) – The object which received the signalpage (
RB.DisplayPage
) – theRB.DisplayPage
that was insertediter (
Gtk.TreeIter
) – aGtk.TreeIter
indicating the page position
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.