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
-
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 the authors from the database into the 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).
Loads file(s) from the filesystem.
Loads file(s) from the media plugin.
Removes all files from the list.
Removes a file from the list.
Add the author to the list of authors associated with this song when the button is clicked.
Show a dialog to change the type of an author when the edit button is clicked
Remove the author from the list when the delete button is clicked.
Run a set of actions when an author in the list is selected (mainly enable the delete button).
Copyright insert button pressed
Moves a file down when the user clicks the up button on the audio tab.
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).
Moves a file up when the user clicks the up button on the audio tab.
Verse Delete button pressed
Verse edit all button (save) pressed
Returns:
-
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).
-
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).
-