RB.LibraryBrowser

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.Orientable Gtk.Orientable GObject.GInterface->Gtk.Orientable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Box Gtk.Box RB.LibraryBrowser RB.LibraryBrowser Gtk.Box->RB.LibraryBrowser Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Gtk.Container->Gtk.Box Gtk.Orientable->Gtk.Box Gtk.Widget->Gtk.Container

Subclasses:None

Properties

Inherited:Gtk.Box (3), Gtk.Container (3), Gtk.Widget (39), Gtk.Orientable (1)
Name Type Flags Short Description
browser-views str r/w/c browser view selection
db RB.RhythmDB r/w/co RB.RhythmDB instance
entry-type RB.RhythmDBEntryType r/w/co Type of entry to display in this browser
input-model RB.RhythmDBQueryModel r input RB.RhythmDBQueryModel instance
output-model RB.RhythmDBQueryModel r output RB.RhythmDBQueryModel instance

Child Properties

Inherited:Gtk.Box (5)

Style Properties

Inherited:Gtk.Widget (17)

Fields

Inherited:Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)
Name Type Access Description
parent Gtk.Box r  

Class Details

class RB.LibraryBrowser(*args, **kwargs)
Bases:Gtk.Box
Abstract:No
Structure:RB.LibraryBrowserClass
classmethod new(db, entry_type)
Parameters:
Returns:

a new RB.LibraryBrowser

Return type:

RB.LibraryBrowser

Creates a new library browser.

construct_query()
Returns:a #RhythmDBQuery constructed from the current selection.
Return type:GLib.PtrArray

Constructs a #RhythmDBQuery from the current selections in the browser.

get_property_view(type)
Parameters:type (RB.RhythmDBPropType) – the property
Returns:RB.PropertyView widget, or None
Return type:RB.PropertyView

Retrieves the property view widget for the specified property, if there is one.

get_property_views()
Returns:a GLib.List containing the RB.PropertyView widgets in the browser.
Return type:[RB.PropertyView]

Retrieves the property view widgets from the browser.

has_selection()
Returns:True if any items in the browser are selected.
Return type:bool

Determines whether the browser has an active selection.

reset()
Returns:True if anything was changed
Return type:bool

Clears all selections in the browser.

set_model(model, query_pending)
Parameters:

Specifies a new input query model for the browser. This should be the query model constructed from the current search text, or the basic query model for the source if there is no search text.

set_selection(type, selection)
Parameters:
  • type (RB.RhythmDBPropType) – the property for which to set the selection
  • selection ([str]) – a list of strings to select

Replaces any current selection for the specified property.

Property Details

RB.LibraryBrowser.props.browser_views
Name:browser-views
Type:str
Default Value:'artists-albums'
Flags:READABLE, WRITABLE, CONSTRUCT

The set of browsers to display.

RB.LibraryBrowser.props.db
Name:db
Type:RB.RhythmDB
Default Value:None
Flags:READABLE, WRITABLE, CONSTRUCT_ONLY

RB.RhythmDB instance

RB.LibraryBrowser.props.entry_type
Name:entry-type
Type:RB.RhythmDBEntryType
Default Value:None
Flags:READABLE, WRITABLE, CONSTRUCT_ONLY

The type of entries to use in the browser.

RB.LibraryBrowser.props.input_model
Name:input-model
Type:RB.RhythmDBQueryModel
Default Value:None
Flags:READABLE

This RB.RhythmDBQueryModel defines the set of entries that the browser filters. This property is not writeable. To set a new input query model, use RB.LibraryBrowser.set_model.

RB.LibraryBrowser.props.output_model
Name:output-model
Type:RB.RhythmDBQueryModel
Default Value:None
Flags:READABLE

This RB.RhythmDBQueryModel contains the filtered set of entries. It is a subset of the entries contained in the input model. This should be used as the model backing the source’s entry view.

Sources using this widget should connect to the notify signal for this property, updating their entry view when it changes.