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.RhythmDBQueryModelthat theRB.ShellPlayeruses 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.RhythmDBinstance.- Return type:
 
Only for use by
RB.PlayOrdersubclasses.
- 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.ShellPlayerinstance- Return type:
 
Only for use by
RB.PlayOrdersubclasses.
- 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
Noneif not currently playing.
- get_query_model()¶
 - Returns:
 the active
RB.RhythmDBQueryModelfor the playing source.- Return type:
 
Only for use by
RB.PlayOrdersubclasses.
- get_source()¶
 - 
Only for use by
RB.PlayOrdersubclasses. 
- 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
Trueif there is an entry before the current entry in the play order. If not currently playing, returnsFalse. 
- model_not_empty()¶
 - 
Returns
Trueif theRB.RhythmDBQueryModelis 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.Sourcefor the play order. Should be called byRB.ShellPlayerwhen the active source changes. Subclasses should implement playing_source_changed() to make any necessary changes. 
- query_model_changed()¶
 Updates the
RB.RhythmDBQueryModelinstance for the play order. Called from theRB.Sourcenotify 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.RhythmDBEntryorNone) – The new playing entry (orNonefor 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
Noneif 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
Trueif 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.RhythmDBQueryModelinstance for the play order. Called from theRB.Sourcenotify 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.ShellPlayerinstance
- RB.PlayOrder.props.playing_entry¶
 - Name:
 playing-entry- Type:
 - Default Value:
 - Flags:
 
The current playing
RB.RhythmDBEntry