mediaitem

class openlp.plugins.songs.lib.mediaitem.SongMediaItem(parent, plugin)[source]

Bases: openlp.core.lib.mediamanageritem.MediaManagerItem

This is the custom media manager item for Songs.

add_custom_context_actions()[source]
add_end_header_bar()[source]
config_update()[source]

Is triggered when the songs config is updated

display_results_author(search_results)[source]

Display the song search results in the media manager list, grouped by author

Parameters:search_results – A list of db Author objects
Returns:None
display_results_book(search_results)[source]

Display the song search results in the media manager list, grouped by book and entry

Parameters:search_results – A tuple containing (songbook entry, book name, song title, song id)
Returns:None
display_results_cclinumber(search_results)[source]

Display the song search results in the media manager list, sorted by CCLI number

Parameters:search_results – A list of db Song objects
Returns:None
display_results_song(search_results)[source]

Display the song search results in the media manager list

Parameters:search_results – A list of db Song objects
Returns:None
display_results_themes(search_results)[source]

Display the song search results in the media manager list, sorted by theme

Parameters:search_results – A list of db Song objects
Returns:None
display_results_topic(search_results)[source]

Display the song search results in the media manager list, grouped by topic

Parameters:search_results – A list of db Topic objects
Returns:None

Generates the song footer based on a song and adds details to a service item.

Parameters:
  • item – The service item to be amended
  • song – The song to be used to generate the footer
Returns:

List of all authors (only required for initial song generation)

generate_slide_data(service_item, item=None, xml_version=False, remote=False, context=2)[source]

Generate the slide data. Needs to be implemented by the plugin.

Parameters:
  • service_item – The service item to be built on
  • item – The Song item to be used
  • xml_version – The xml version (not used)
  • remote – Triggered from remote
  • context – Why is it being generated
initialise()[source]

Initialise variables when they cannot be initialised in the constructor.

on_clear_text_button_click()[source]

Clear the search text.

on_clone_click()[source]

Clone a Song

on_delete_click()[source]

Remove a song from the list and database

on_edit_click()[source]

Edit a song

on_export_click()[source]
on_focus()[source]
on_import_click()[source]
on_new_click()[source]
on_remote_edit(song_id, preview=False)[source]

Called by ServiceManager or SlideController by event passing the Song Id in the payload along with an indicator to say which type of display is required.

on_search_text_button_clicked()[source]
on_search_text_edit_changed(text)[source]

If search as type enabled invoke the search on each key press. If the Lyrics are being searched do not start till 7 characters have been entered.

on_song_list_load()[source]

Handle the exit from the edit dialog and trigger remote updates of songs

on_song_maintenance_click()[source]
retranslateUi()[source]
search(string, show_error)[source]

Search for some songs :param string: The string to show :param show_error: Is this an error?

search_entire(search_keywords)[source]
service_load(item)[source]

Triggered by a song being loaded by the service manager.

setup_item()[source]

Do some additional setup.

songs_add_to_service
songs_go_live
class openlp.plugins.songs.lib.mediaitem.SongSearch[source]

Bases: object

An enumeration for song search methods.

Authors = 4
Books = 6
CCLInumber = 9
Copyright = 8
Entire = 1
Lyrics = 3
Themes = 7
Titles = 2
Topics = 5