RB.PlayOrder¶
Subclasses: | None |
---|
Methods¶
Inherited: | GObject.Object (37) |
---|---|
Structs: | GObject.ObjectClass (5) |
get_db () |
|
get_next () |
|
get_player () |
|
get_playing_entry () |
|
get_previous () |
|
get_query_model () |
|
get_source () |
|
go_next () |
|
go_previous () |
|
has_next () |
|
has_previous () |
|
model_not_empty () |
|
player_is_playing () |
|
playing_source_changed (source) |
|
query_model_changed () |
|
set_playing_entry (entry) |
Virtual Methods¶
Inherited: | GObject.Object (7) |
---|
do_db_changed (new_db) |
|
do_db_entry_deleted (entry) |
|
do_entry_added (entry) |
|
do_entry_removed (entry) |
|
do_get_next () |
|
do_get_previous () |
|
do_go_next () |
|
do_go_previous () |
|
do_has_next () |
|
do_has_previous () |
|
do_have_next_previous_changed (have_next, have_previous) |
|
do_playing_entry_changed (old_entry, new_entry) |
|
do_playing_entry_removed (entry) |
|
do_playing_source_changed () |
|
do_query_model_changed () |
Properties¶
Name | Type | Flags | Short Description |
---|---|---|---|
player |
RB.ShellPlayer |
r/w/co | Rhythmbox Player |
playing-entry |
RB.RhythmDBEntry |
r/w | Playing entry |
Signals¶
Inherited: | GObject.Object (1) |
---|
Name | Short Description |
---|---|
have-next-previous-changed |
Emitted as a hint to suggest that the sensitivity of next/previous buttons may need to be updated. |
Class Details¶
-
class
RB.
PlayOrder
(**kwargs)¶ Bases: GObject.Object
Abstract: No Structure: RB.PlayOrderClass
-
get_db
()¶ Returns: the RB.RhythmDB
instance.Return type: RB.RhythmDB
Only for use by
RB.PlayOrder
subclasses.
-
get_next
()¶ Returns: next entry to play Return type: RB.RhythmDBEntry
Returns the next entry in the play order, or the first if not currently playing.
-
get_player
()¶ Returns: RB.ShellPlayer
instanceReturn type: RB.ShellPlayer
Only for use by
RB.PlayOrder
subclasses.
-
get_playing_entry
()¶ Returns: playing entry Return type: RB.RhythmDBEntry
Returns the current playing entry in the play order.
-
get_previous
()¶ Returns: previous entry Return type: RB.RhythmDBEntry
Returns the previous entry in the play order, or
None
if not currently playing.
-
get_query_model
()¶ Returns: the active RB.RhythmDBQueryModel
for the playing source.Return type: RB.RhythmDBQueryModel
Only for use by
RB.PlayOrder
subclasses.
-
get_source
()¶ Returns: the playing RB.Source
instance.Return type: RB.Source
Only for use by
RB.PlayOrder
subclasses.
-
go_next
()¶ Moves to the next entry in the play order. If not currently playing, sets the first entry in the play order as the playing entry.
-
go_previous
()¶ Moves to the previous entry in the play order. If not currently playing, does nothing.
-
has_next
()¶ Returns: true if there is an entry after the current playing entry in the play order. Return type: bool
If there is no current playing entry, returns true if the play order is non-empty.
-
has_previous
()¶ Returns: True
if previous entry existsReturn type: bool
Returns
True
if there is an entry before the current entry in the play order. If not currently playing, returnsFalse
.
-
model_not_empty
()¶ Returns: True
if not emptyReturn type: bool
Returns
True
if theRB.RhythmDBQueryModel
is not empty. Can be used to implement has_next and has_previous for play orders that have no beginning or end.
-
player_is_playing
()¶ Returns: True
if playingReturn type: bool
Returns
True
if there is a current playing entry in the play order.
-
playing_source_changed
(source)¶ Parameters: source ( RB.Source
) – New playingRB.Source
Sets the playing
RB.Source
for the play order. Should be called byRB.ShellPlayer
when the active source changes. Subclasses should implement playing_source_changed() to make any necessary changes.
-
query_model_changed
()¶ Updates the
RB.RhythmDBQueryModel
instance for the play order. Called from theRB.Source
notify signal handler, and also from #rb_play_order_source_changed. Subclasses should implement query_model_changed() to make any necessary adjustments if they store any state based on the contents of theRB.RhythmDBQueryModel
.
-
set_playing_entry
(entry)¶ Parameters: entry ( RB.RhythmDBEntry
orNone
) – The new playing entry (orNone
for none)Sets the playing entry in the play order.
-
do_db_changed
(new_db) virtual¶ Parameters: new_db ( RB.RhythmDB
) –
-
do_db_entry_deleted
(entry) virtual¶ Parameters: entry ( RB.RhythmDBEntry
) –
-
do_entry_added
(entry) virtual¶ Parameters: entry ( RB.RhythmDBEntry
) –
-
do_entry_removed
(entry) virtual¶ Parameters: entry ( RB.RhythmDBEntry
) –
-
do_get_next
() virtual¶ Returns: next entry to play Return type: RB.RhythmDBEntry
Returns the next entry in the play order, or the first if not currently playing.
-
do_get_previous
() virtual¶ Returns: previous entry Return type: RB.RhythmDBEntry
Returns the previous entry in the play order, or
None
if not currently playing.
-
do_go_next
() virtual¶ Moves to the next entry in the play order. If not currently playing, sets the first entry in the play order as the playing entry.
-
do_go_previous
() virtual¶ Moves to the previous entry in the play order. If not currently playing, does nothing.
-
do_has_next
() virtual¶ Returns: true if there is an entry after the current playing entry in the play order. Return type: bool
If there is no current playing entry, returns true if the play order is non-empty.
-
do_has_previous
() virtual¶ Returns: True
if previous entry existsReturn type: bool
Returns
True
if there is an entry before the current entry in the play order. If not currently playing, returnsFalse
.
-
do_have_next_previous_changed
(have_next, have_previous) virtual¶ Parameters:
-
do_playing_entry_changed
(old_entry, new_entry) virtual¶ Parameters: - old_entry (
RB.RhythmDBEntry
) – - new_entry (
RB.RhythmDBEntry
) –
- old_entry (
-
do_playing_entry_removed
(entry) virtual¶ Parameters: entry ( RB.RhythmDBEntry
) –
-
do_playing_source_changed
() virtual¶
-
do_query_model_changed
() virtual¶ Updates the
RB.RhythmDBQueryModel
instance for the play order. Called from theRB.Source
notify signal handler, and also from #rb_play_order_source_changed. Subclasses should implement query_model_changed() to make any necessary adjustments if they store any state based on the contents of theRB.RhythmDBQueryModel
.
-
Signal Details¶
-
RB.PlayOrder.signals.
have_next_previous_changed
(play_order, have_next, have_previous)¶ Signal Name: have-next-previous-changed
Flags: Parameters: - play_order (
RB.PlayOrder
) – The object which received the signal - have_next (
bool
) – ifTrue
, the play order has at least one more entry - have_previous (
bool
) – ifTrue
, the play order has at least one entry before the current entry
Emitted as a hint to suggest that the sensitivity of next/previous buttons may need to be updated.
- play_order (
Property Details¶
-
RB.PlayOrder.props.
player
¶ Name: player
Type: RB.ShellPlayer
Default Value: None
Flags: READABLE
,WRITABLE
,CONSTRUCT_ONLY
The
RB.ShellPlayer
instance
-
RB.PlayOrder.props.
playing_entry
¶ Name: playing-entry
Type: RB.RhythmDBEntry
Default Value: None
Flags: READABLE
,WRITABLE
The current playing
RB.RhythmDBEntry