RB.PropertyView¶
Subclasses: | None |
---|
Methods¶
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: Creates a new
RB.PropertyView
displaying the specified property.- db (
-
append_column_custom
(column)¶ Parameters: column ( Gtk.TreeViewColumn
) – aGtk.TreeViewColumn
to append to the viewAppends 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 visibleSets the visibility of the property column.
-
set_model
(model)¶ Parameters: model ( RB.RhythmDBPropertyModel
) – the newRB.RhythmDBPropertyModel
for the property viewReplaces the model backing the property view.
-
set_search_func
(func, *func_data)¶ Parameters: - func (
Gtk.TreeViewSearchEqualFunc
) – tree view search function to use for this view - func_data (
object
orNone
) – data to pass to the search function
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.- func (
-
set_selection
(vals)¶ Parameters: vals ([ str
]) – the values to be selectedReplaces 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 newGtk.SelectionMode
for the property viewSets the selection mode (single or multiple) for the property view> The default selection mode is single.
-
do_selection_reset
() virtual¶
-
do_show_popup
() virtual¶
-
classmethod
Signal Details¶
-
RB.PropertyView.signals.
properties_selected
(property_view, properties)¶ Signal Name: properties-selected
Flags: Parameters: - property_view (
RB.PropertyView
) – The object which received the signal - properties (
object
orNone
) – 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.
- property_view (
-
RB.PropertyView.signals.
property_activated
(property_view, name)¶ Signal Name: property-activated
Flags: 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.
- property_view (
-
RB.PropertyView.signals.
property_selected
(property_view, name)¶ Signal Name: property-selected
Flags: 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.
- property_view (
-
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 signalEmitted 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 signalEmitted 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