RB.PropertyView

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 GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Bin Gtk.Bin Gtk.ScrolledWindow Gtk.ScrolledWindow Gtk.Bin->Gtk.ScrolledWindow Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Gtk.Container->Gtk.Bin RB.PropertyView RB.PropertyView Gtk.ScrolledWindow->RB.PropertyView Gtk.Widget->Gtk.Container

Subclasses:

None

Methods

Inherited:

Gtk.ScrolledWindow (33), Gtk.Bin (1), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10)

Structs:

Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)

class

new (db, propid, title)

append_column_custom (column)

get_model ()

get_num_properties ()

get_selection ()

reset ()

set_column_visible (visible)

set_model (model)

set_search_func (func, *func_data)

set_selection (vals)

set_selection_mode (mode)

Virtual Methods

Inherited:

Gtk.ScrolledWindow (2), Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10)

do_property_activated (name)

do_property_selected (name)

do_selection_reset ()

do_show_popup ()

Properties

Inherited:

Gtk.ScrolledWindow (15), Gtk.Container (3), Gtk.Widget (39)

Name

Type

Flags

Short Description

db

RB.RhythmDB

r/w/co

RB.RhythmDB database

draggable

bool

r/w/co

is a drag source

prop

RB.RhythmDBPropType

r/w/co

RB.RhythmDBPropType

property-model

RB.RhythmDBPropertyModel

r/w

RB.RhythmDBPropertyModel

title

str

r/w/co

title

Style Properties

Inherited:

Gtk.ScrolledWindow (2), Gtk.Widget (17)

Signals

Inherited:

Gtk.ScrolledWindow (4), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Name

Short Description

properties-selected

Emitted when the set of selected property values changes.

property-activated

Emitted when a row in a property view is activated by double clicking.

property-selected

Emitted when an individual property value becomes selected.

property-selection-reset

Emitted when the selection is reset.

show-popup

Emitted when a popup menu should be displayed for the property view.

Fields

Inherited:

Gtk.ScrolledWindow (4), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Name

Type

Access

Description

parent

Gtk.ScrolledWindow

r

Class Details

class RB.PropertyView(*args, **kwargs)
Bases:

Gtk.ScrolledWindow

Abstract:

No

Structure:

RB.PropertyViewClass

classmethod new(db, propid, title)
Parameters:
  • db (RB.RhythmDB) – RB.RhythmDB instance

  • propid (int) – property ID to be displayed in the property view

  • title (str) – title of the property view

Returns:

new property view instance

Return type:

RB.PropertyView

Creates a new RB.PropertyView displaying the specified property.

append_column_custom(column)
Parameters:

column (Gtk.TreeViewColumn) – a Gtk.TreeViewColumn to append to the view

Appends a custom created column to the view.

get_model()
Returns:

property model

Return type:

RB.RhythmDBPropertyModel

Returns the RB.RhythmDBPropertyModel backing the view; no reference is taken

get_num_properties()
Returns:

number of properties

Return type:

int

Returns the number of property values present in the view.

get_selection()
Returns:

list of selected values

Return type:

[str]

Returns a GLib.List containing the selected property values. The list must be freed by the caller.

reset()

Clears the selection in the property view.

set_column_visible(visible)
Parameters:

visible (bool) – whether the property column should be visible

Sets the visibility of the property column.

set_model(model)
Parameters:

model (RB.RhythmDBPropertyModel) – the new RB.RhythmDBPropertyModel for the property view

Replaces the model backing the property view.

set_search_func(func, *func_data)
Parameters:

Sets the compare function for the interactive search capabilities. The function must return False when the search key string matches the row it is passed.

set_selection(vals)
Parameters:

vals ([str]) – the values to be selected

Replaces the selection in the property view. All values in the list that are present in the view will be selected, and the view will be scrolled to show the last value selected.

set_selection_mode(mode)
Parameters:

mode (Gtk.SelectionMode) – the new Gtk.SelectionMode for the property view

Sets the selection mode (single or multiple) for the property view> The default selection mode is single.

do_property_activated(name) virtual
Parameters:

name (str) –

do_property_selected(name) virtual
Parameters:

name (str) –

do_selection_reset() virtual
do_show_popup() virtual

Signal Details

RB.PropertyView.signals.properties_selected(property_view, properties)
Signal Name:

properties-selected

Flags:

RUN_LAST

Parameters:
  • property_view (RB.PropertyView) – The object which received the signal

  • properties (object or None) – a list containing the selected property values

Emitted when the set of selected property values changes. This is only emitted for multiple selection property views. For single-selection views, use the property-selected signal.

RB.PropertyView.signals.property_activated(property_view, name)
Signal Name:

property-activated

Flags:

RUN_LAST

Parameters:
  • property_view (RB.PropertyView) – The object which received the signal

  • name (str) – the property value that was activated

Emitted when a row in a property view is activated by double clicking.

RB.PropertyView.signals.property_selected(property_view, name)
Signal Name:

property-selected

Flags:

RUN_LAST

Parameters:
  • property_view (RB.PropertyView) – The object which received the signal

  • name (str) – the property value that has been selected

Emitted when an individual property value becomes selected. This is only emitted for single-selection property views. For multiple-selection views, use the properties-selected signal.

RB.PropertyView.signals.property_selection_reset(property_view)
Signal Name:

property-selection-reset

Flags:

RUN_LAST

Parameters:

property_view (RB.PropertyView) – The object which received the signal

Emitted when the selection is reset. At this point, no property values are selected.

RB.PropertyView.signals.show_popup(property_view)
Signal Name:

show-popup

Flags:

RUN_LAST

Parameters:

property_view (RB.PropertyView) – The object which received the signal

Emitted when a popup menu should be displayed for the property view. The source containing the property view should connect a handler to this signal that * displays an appropriate popup.

Property Details

RB.PropertyView.props.db
Name:

db

Type:

RB.RhythmDB

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

RB.RhythmDB instance

RB.PropertyView.props.draggable
Name:

draggable

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Whether the property view acts as a data source for drag and drop operations.

RB.PropertyView.props.prop
Name:

prop

Type:

RB.RhythmDBPropType

Default Value:

RB.RhythmDBPropType.TYPE

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The property that is displayed in this view

RB.PropertyView.props.property_model
Name:

property-model

Type:

RB.RhythmDBPropertyModel

Default Value:

None

Flags:

READABLE, WRITABLE

The RB.RhythmDBPropertyModel backing the view.

RB.PropertyView.props.title
Name:

title

Type:

str

Default Value:

''

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The title displayed in the header of the property view