RB.PlayOrder¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
Rhythmbox Player |
||
r/w |
Playing entry |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emitted as a hint to suggest that the sensitivity of next/previous buttons may need to be updated. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class RB.PlayOrder(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A play order defines an ordering of the entries from a
RB.RhythmDBQueryModel
that theRB.ShellPlayer
uses to get the next or previous entry to play.Play order methods are invoked when changes are made to the query model, when the query model is replaced, the playing source is changed, or a new playing entry is selected.
The play order must implement methods to check for, retrieve, and move to the next and previous entries in the play order. Only the go_next and go_previous methods actually change anything.
The play order should also emit the have-next-previous-changed signal to hint that the availability of either a next or previous entry in the order may have changed. This information is used to update the sensitivity of the next and previous buttons.
- get_db()¶
- Returns:
the
RB.RhythmDB
instance.- Return type:
Only for use by
RB.PlayOrder
subclasses.
- get_next()¶
- Returns:
next entry to play
- Return type:
Returns the next entry in the play order, or the first if not currently playing.
- get_player()¶
- Returns:
RB.ShellPlayer
instance- Return type:
Only for use by
RB.PlayOrder
subclasses.
- get_playing_entry()¶
- Returns:
playing entry
- Return type:
Returns the current playing entry in the play order.
- get_previous()¶
- Returns:
previous entry
- Return type:
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:
Only for use by
RB.PlayOrder
subclasses.
- get_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:
If there is no current playing entry, returns true if the play order is non-empty.
- has_previous()¶
-
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 theRB.RhythmDBQueryModel
is not empty. Can be used to implement has_next and has_previous for play orders that have no beginning or end.
- playing_source_changed(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:
Returns the next entry in the play order, or the first if not currently playing.
- do_get_previous() virtual¶
- Returns:
previous entry
- Return type:
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:
If there is no current playing entry, returns true if the play order is non-empty.
- do_has_previous() virtual¶
-
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¶
- do_playing_entry_changed(old_entry, new_entry) virtual¶
- Parameters:
old_entry (
RB.RhythmDBEntry
) –new_entry (
RB.RhythmDBEntry
) –
- 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 signalhave_next (
bool
) – ifTrue
, the play order has at least one more entryhave_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.
Property Details¶
- RB.PlayOrder.props.player¶
- Name:
player
- Type:
- Default Value:
- Flags:
The
RB.ShellPlayer
instance
- RB.PlayOrder.props.playing_entry¶
- Name:
playing-entry
- Type:
- Default Value:
- Flags:
The current playing
RB.RhythmDBEntry