RB.LibraryBrowser¶
- Subclasses:
 None
Methods¶
- Inherited:
 Gtk.Box (14), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.Orientable (2)
- Structs:
 Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)
class  | 
  | 
  | 
|
  | 
|
  | 
|
  | 
Virtual Methods¶
Properties¶
- Inherited:
 Gtk.Box (3), Gtk.Container (3), Gtk.Widget (39), Gtk.Orientable (1)
Name  | 
Type  | 
Flags  | 
Short Description  | 
|---|---|---|---|
r/w/c  | 
browser view selection  | 
||
r/w/co  | 
  | 
||
r/w/co  | 
Type of entry to display in this browser  | 
||
r  | 
input   | 
||
r  | 
output   | 
Child Properties¶
- Inherited:
 
Style Properties¶
- Inherited:
 
Signals¶
- Inherited:
 
Fields¶
- Inherited:
 
Name  | 
Type  | 
Access  | 
Description  | 
|---|---|---|---|
parent  | 
r  | 
Class Details¶
- class RB.LibraryBrowser(*args, **kwargs)¶
 - Bases:
 - Abstract:
 No
- Structure:
 
This widget contains a set of
RB.PropertyViews backed byRB.RhythmDBPropertyModels and constructs a chain ofRB.RhythmDBQueryModels to perform filtering of the entries in a source.It operates on an input query model, containing the full set of entries that may be displayed in the source, and produces an output query model containing those entries that match the current selection.
When the selection in any of the property views changes, or when
RB.LibraryBrowser.resetorRB.LibraryBrowser.set_selectionare called to manipulate the selection, the query chain is rebuilt asynchronously to update the property views.- classmethod new(db, entry_type)¶
 - Parameters:
 db (
RB.RhythmDB) – theRB.RhythmDBinstanceentry_type (
RB.RhythmDBEntryType) – the entry type to use in the browser
- Returns:
 a new
RB.LibraryBrowser- Return type:
 
Creates a new library browser.
- construct_query()¶
 - Returns:
 a #RhythmDBQuery constructed from the current selection.
- Return type:
 
Constructs a #RhythmDBQuery from the current selections in the browser.
- get_property_view(type)¶
 - Parameters:
 type (
RB.RhythmDBPropType) – the property- Returns:
 RB.PropertyViewwidget, orNone- Return type:
 
Retrieves the property view widget for the specified property, if there is one.
- get_property_views()¶
 - Returns:
 a
GLib.Listcontaining theRB.PropertyViewwidgets in the browser.- Return type:
 
Retrieves the property view widgets from the browser.
- has_selection()¶
 - 
Determines whether the browser has an active selection.
 
- reset()¶
 - 
Clears all selections in the browser.
 
- set_model(model, query_pending)¶
 - Parameters:
 model (
RB.RhythmDBQueryModel) – the new inputRB.RhythmDBQueryModelquery_pending (
bool) – ifTrue, the caller promises to run a query to populate the input query model.
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 selectionselection ([
str]) – a list of strings to select
Replaces any current selection for the specified property.
Property Details¶
- RB.LibraryBrowser.props.browser_views¶
 - 
The set of browsers to display.
 
- RB.LibraryBrowser.props.db¶
 - Name:
 db- Type:
 - Default Value:
 - Flags:
 
RB.RhythmDBinstance
- RB.LibraryBrowser.props.entry_type¶
 - Name:
 entry-type- Type:
 - Default Value:
 - Flags:
 
The type of entries to use in the browser.
- RB.LibraryBrowser.props.input_model¶
 - Name:
 input-model- Type:
 - Default Value:
 - Flags:
 
This
RB.RhythmDBQueryModeldefines the set of entries that the browser filters. This property is not writeable. To set a new input query model, useRB.LibraryBrowser.set_model.
- RB.LibraryBrowser.props.output_model¶
 - Name:
 output-model- Type:
 - Default Value:
 - Flags:
 
This
RB.RhythmDBQueryModelcontains 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.