wizard¶
The :mod:wizard
module provides generic wizard tools for OpenLP.
-
class
openlp.core.ui.lib.wizard.
OpenLPWizard
(parent, plugin, name, image, add_progress_page=True)[source]¶ Bases:
PyQt5.QtWidgets.QWizard
,openlp.core.common.registryproperties.RegistryProperties
Generic OpenLP wizard to provide generic functionality and a unified look and feel.
parent
- The QWidget-derived parent of the wizard.
plugin
- Plugin this wizard is part of. The plugin will be saved in the “plugin” variable. The plugin will also be used as basis for the file dialog methods this class provides.
name
- The object name this wizard should have.
image
- The image to display on the “welcome” page of the wizard. Should be 163x350.
add_progress_page
- Whether to add a progress page with a progressbar at the end of the wizard.
-
add_progress_page
()[source]¶ Add the progress page for the wizard. This page informs the user how the wizard is progressing with its task.
-
custom_page_changed
(page_id)[source]¶ Called when changing to a page other than the progress page :param page_id: current page number
-
get_file_name
(title, editbox, setting_name, filters='')[source]¶ Opens a QFileDialog and saves the filename to the given editbox.
Parameters: - title – The title of the dialog (unicode).
- editbox – An editbox (QLineEdit).
- setting_name – The place where to save the last opened directory.
- filters –
The file extension filters. It should contain the file description as well as the file extension. For example:
'OpenLP 2 Databases (*.sqlite)'
-
get_folder
(title, editbox, setting_name)[source]¶ Opens a QFileDialog and saves the selected folder to the given editbox.
Parameters: - title – The title of the dialog (unicode).
- editbox – An editbox (QLineEdit).
- setting_name – The place where to save the last opened directory.
-
increment_progress_bar
(status_text, increment=1)[source]¶ Update the wizard progress page.
Parameters: - status_text – Current status information to display.
- increment – The value to increment the progress bar by.
-
on_current_id_changed
(page_id)[source]¶ Perform necessary functions depending on which wizard page is active. :param page_id: current page number
Called when the
error_copy_to_button
has been clicked.
Called when the
error_save_to_button
has been clicked.
-
class
openlp.core.ui.lib.wizard.
WizardStrings
[source]¶ Bases:
object
Provide standard strings for wizards to use.
-
CSV
= 'CSV'¶
-
FinishedImport
= 'Finished import.'¶
-
FormatLabel
= 'Format:'¶
-
HeaderStyle
= '<span style="font-size:14pt; font-weight:600;">%s</span>'¶
-
ImportSelect
= 'Select Import Source'¶
-
ImportSelectLong
= 'Select the import format and the location to import from.'¶
-
Importing
= 'Importing'¶
-
ImportingType
= 'Importing "%s"...'¶
-
OS
= 'OpenSong'¶
-
OSIS
= 'OSIS'¶
-
OpenTypeFile
= 'Open %s File'¶
-
OpenTypeFolder
= 'Open %s Folder'¶
-
PercentSymbolFormat
= '%p%'¶
-
Ready
= 'Ready.'¶
-
SWORD
= 'Sword'¶
-
StartingImport
= 'Starting import...'¶
-
WordProject
= 'WordProject'¶
-
YouSpecifyFile
= 'You need to specify one %s file to import from.'¶
-
YouSpecifyFiles
= 'You need to specify at least one %s file to import from.'¶
-
YouSpecifyFolder
= 'You need to specify one %s folder to import from.'¶
-
ZEF
= 'Zefania'¶
-