editsongform

The editsongform module contains the form used to edit songs.

class openlp.plugins.songs.forms.editsongform.EditSongForm(media_item, parent, manager)[source]

Bases: PyQt5.QtWidgets.QDialog, openlp.plugins.songs.forms.editsongdialog.Ui_EditSongDialog, openlp.core.common.registryproperties.RegistryProperties

Class to manage the editing of a song

accept()[source]

Exit Dialog and save song if valid

add_songbook_entry_to_list(songbook_id, songbook_name, entry)[source]
clear_caches()[source]

Free up auto-completion memory on dialog exit

initialise()[source]

Set up the form for when it is displayed.

keyPressEvent(event)[source]

Re-implement the keyPressEvent to react on Return/Enter keys. When some combo boxes have focus we do not want dialog’s default action be triggered but instead our own.

Parameters:event – A QtWidgets.QKeyEvent event.
load_authors()[source]

Load the authors from the database into the combobox.

load_media_files()[source]

Load the media files into a combobox.

load_song(song_id, preview=False)[source]

Loads a song.

Parameters:
  • song_id – The song id (int).
  • preview – Should be True if the song is also previewed (boolean).
load_songbooks()[source]

Load the Songbooks into the combobox

load_themes(theme_list)[source]

Load the themes into a combobox.

load_topics()[source]

Load the topics into the combobox.

new_song()[source]

Blank the edit form out in preparation for a new song.

on_audio_add_from_file_button_clicked()[source]

Loads file(s) from the filesystem.

on_audio_add_from_media_button_clicked()[source]

Loads file(s) from the media plugin.

on_audio_remove_all_button_clicked()[source]

Removes all files from the list.

on_audio_remove_button_clicked()[source]

Removes a file from the list.

on_author_add_button_clicked()[source]

Add the author to the list of authors associated with this song when the button is clicked.

on_author_edit_button_clicked()[source]

Show a dialog to change the type of an author when the edit button is clicked

on_author_remove_button_clicked()[source]

Remove the author from the list when the delete button is clicked.

on_authors_list_view_clicked()[source]

Run a set of actions when an author in the list is selected (mainly enable the delete button).

Copyright insert button pressed

on_down_button_clicked()[source]

Moves a file down when the user clicks the up button on the audio tab.

on_maintenance_button_clicked()[source]

Maintenance button pressed

on_preview(button)[source]

Save and Preview button clicked. The Song is valid so as the plugin to add it to preview to see.

Parameters:button – A button (QPushButton).
on_songbook_add_button_clicked()[source]
on_songbook_list_view_clicked()[source]
on_songbook_remove_button_clicked()[source]
on_topic_add_button_clicked()[source]
on_topic_list_view_clicked()[source]
on_topic_remove_button_clicked()[source]
on_up_button_clicked()[source]

Moves a file up when the user clicks the up button on the audio tab.

on_verse_add_button_clicked()[source]
on_verse_delete_button_clicked()[source]

Verse Delete button pressed

on_verse_edit_all_button_clicked()[source]

Verse edit all button (save) pressed

Returns:
on_verse_edit_button_clicked()[source]
on_verse_list_view_clicked()[source]
on_verse_order_text_changed(text)[source]

Checks if the verse order is complete or missing. Shows a error message according to the state of the verse order.

Parameters:text – The text of the verse order edit (ignored).
reject()[source]

Exit Dialog and do not save

save_song(preview=False)[source]

Get all the data from the widgets on the form, and then save it to the database. The form has been validated and all reference items (Authors, Books and Topics) have been saved before this function is called.

Parameters:preview – Should be True if the song is also previewed (boolean).
tag_rows()[source]

Tag the Song List rows based on the verse list