ui¶
- aboutdialog
- aboutform
- advancedtab
- exceptiondialog
- exceptionform
- filerenamedialog
- filerenameform
- firsttimeform
- firsttimelanguagedialog
- firsttimelanguageform
- firsttimewizard
- formattingtagcontroller
- formattingtagdialog
- formattingtagform
- generaltab
- lib
- maindisplay
- mainwindow
- media
- projector
- serviceitemeditdialog
- serviceitemeditform
- servicemanager
- servicenoteform
- settingsdialog
- settingsform
- shortcutlistdialog
- shortcutlistform
- slidecontroller
- splashscreen
- starttimedialog
- starttimeform
- themeform
- themelayoutdialog
- themelayoutform
- thememanager
- themestab
- themewizard
The ui
module provides the core user interface for OpenLP
-
class
openlp.core.ui.
AboutForm
(parent)[source]¶ Bases:
PyQt5.QtWidgets.QDialog
,openlp.core.ui.aboutdialog.UiAboutDialog
The About dialog
Launch a web browser and go to the contribute page on the site.
-
class
openlp.core.ui.
SettingsForm
(parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QDialog
,openlp.core.ui.settingsdialog.Ui_SettingsDialog
,openlp.core.common.registryproperties.RegistryProperties
Provide the form to manipulate the settings for OpenLP
-
insert_tab
(tab_widget, is_visible=True)[source]¶ Add a tab to the form at a specific location
Parameters: - tab_widget – The widget to add
- is_visible – If this tab should be visible
-
list_item_changed
(item_index)[source]¶ A different settings tab is selected
Parameters: item_index – The index of the item that was selected
-
-
class
openlp.core.ui.
MainDisplay
(parent)[source]¶ Bases:
openlp.core.common.openlpmixin.OpenLPMixin
,openlp.core.ui.maindisplay.Display
,openlp.core.common.registryproperties.RegistryProperties
This is the display screen as a specialized class from the Display class
-
alert
(text, location)[source]¶ Display an alert.
Parameters: - text – The text to be displayed.
- location – Where on the screen is the text to be displayed
-
build_html
(service_item, image_path='')[source]¶ Store the service_item and build the new HTML from it. Add the HTML to the display
Parameters: - service_item – The Service item to be used
- image_path – Where the image resides.
-
change_window_level
(window)[source]¶ Changes the display window level on Mac OS X so that the main window can be brought into focus but still allow the main display to be above the menu bar and dock when it in focus.
Parameters: window – Window from our application that focus changed to or None if outside our application
-
closeEvent
(event)[source]¶ Catch the close event, and check that the close event is triggered by OpenLP closing the display. On Windows this event can be triggered by pressing ALT+F4, which we want to ignore.
Parameters: event – The triggered event
-
direct_image
(path, background)[source]¶ API for replacement backgrounds so Images are added directly to cache.
Parameters: - path – Path to Image
- background – The background color
Display the Footer
Parameters: text – footer text to be displayed
-
hide_display
(mode=3)[source]¶ Hide the display by making all layers transparent Store the images so they can be replaced when required
Parameters: mode – How the screen is to be hidden
-
image
(path)[source]¶ Add an image as the background. The image has already been added to the cache.
Parameters: path – The path to the image to be displayed. Note, the path is only passed to identify the image. If the image has changed it has to be re-added to the image manager.
-
reset_image
()[source]¶ Reset the background image to the service item image. Used after the image plugin has changed the background.
-
set_transparency
(enabled)[source]¶ Set the transparency of the window
Parameters: enabled – Is transparency enabled
-
shake_web_view
()[source]¶ Resizes the web_view a bit to force an update. Workaround for bug #1531319, should not be needed with PyQt 5.6.
-
-
class
openlp.core.ui.
SlideController
(parent)[source]¶ Bases:
openlp.core.ui.slidecontroller.DisplayController
,openlp.core.common.registryproperties.RegistryProperties
SlideController is the slide controller widget. This widget is what the user uses to control the displaying of verses/slides/etc on the screen.
-
add_service_item
(item)[source]¶ Method to install the service item into the controller Called by plugins
Parameters: item – The current service item
-
add_service_manager_item
(item, slide_no)[source]¶ Method to install the service item into the controller and request the correct toolbar for the plugin. Called by
ServiceManager
Parameters: - item – The current service item
- slide_no – The slide number to select
-
enable_live_tool_bar
(item)[source]¶ Allows the live toolbar to be customised
Parameters: item – The current service item
-
enable_preview_tool_bar
(item)[source]¶ Allows the Preview toolbar to be customised
Parameters: item – The current service item
-
enable_tool_bar
(item)[source]¶ Allows the toolbars to be reconfigured based on Controller Type and ServiceItem Type
Parameters: item – current service item being processed
-
main_display_set_background
()[source]¶ Allow the main display to blank the main display at startup time
-
on_audio_time_remaining
(time)[source]¶ Update how much time is remaining
Parameters: time – the time remaining
-
on_blank_display
(checked=None)[source]¶ Handle the blank screen button actions
Parameters: checked – the new state of the of the widget
-
on_controller_size_changed
(width)[source]¶ Change layout of display control buttons on controller size change
Parameters: width – the new width of the display
-
on_go_live
(field=None)[source]¶ If preview copy slide item to live controller from Preview Controller
-
on_hide_display
(checked=None)[source]¶ Handle the Hide screen button This toggles the desktop screen.
Parameters: checked – the new state of the of the widget
-
on_hide_display_enable
(checked=None)[source]¶ Handle the on_hide_display_enable This only enables the desktop screen.
Parameters: checked – the new state of the of the widget
-
on_media_start
(item)[source]¶ Respond to the arrival of a media service item
Parameters: item – The service item to be processed
-
on_play_slides_loop
(checked=None)[source]¶ Start or stop ‘Play Slides in Loop’
Parameters: checked – is the check box checked.
-
on_play_slides_once
(checked=None)[source]¶ Start or stop ‘Play Slides to End’
Parameters: checked – is the check box checked.
-
on_preview_add_to_service
(field=None)[source]¶ From the preview display request the Item to be added to service
-
on_slide_change
(row)[source]¶ The slide has been changed. Update the slidecontroller accordingly
Parameters: row – Row to be selected
-
on_slide_selected
(field=None)[source]¶ Slide selected in controller Note for some reason a dummy field is required. Nothing is passed!
-
on_slide_selected_index
(message)[source]¶ Go to the requested slide
Parameters: message – remote message to be processed.
-
on_slide_selected_next
(wrap=None)[source]¶ Go to the next slide.
Parameters: wrap – Are we wrapping round the service item
-
on_slide_selected_next_action
(checked)[source]¶ Wrapper function from create_action so we can throw away the incorrect parameter
Parameters: checked – the new state of the of the widget
-
on_theme_display
(checked=None)[source]¶ Handle the Theme screen button
Parameters: checked – the new state of the of the widget
-
preview_size_changed
()[source]¶ Takes care of the SlidePreview’s size. Is called when one of the the splitters is moved or when the screen size is changed. Note, that this method is (also) called frequently from the mainwindow paintEvent.
-
replace_service_manager_item
(item)[source]¶ Replacement item following a remote edit. This action also takes place when a song that is sent to live from Service Manager is edited.
Parameters: item – The current service item
-
screen_size_changed
()[source]¶ Settings dialog has changed the screen size of adjust output and screen previews.
-
service_next
(field=None)[source]¶ Live event to select the next service item from the service manager.
-
service_previous
(field=None)[source]¶ Live event to select the previous service item from the service manager.
-
set_audio_pause_clicked
(checked)[source]¶ Pause the audio player
Parameters: checked – is the check box checked.
Set the correct menu type dependent on the service item type
Parameters: visible – Do I need to hide the menu?
-
set_live_hot_keys
(parent=None)[source]¶ Set the live hotkeys
Parameters: parent – The parent UI object for actions to be added to.
-
slide_selected
(start=False)[source]¶ Generate the preview when you click on a slide. If this is the Live Controller also display on the screen
Parameters: start –
-
timerEvent
(event)[source]¶ If the timer event is for this window select next slide
Parameters: event – The triggered event
-
toggle_display
(action)[source]¶ Toggle the display settings triggered from remote messages.
Parameters: action – The blank action to be processed.
-
-
class
openlp.core.ui.
ServiceManager
(parent=None)[source]¶ Bases:
openlp.core.common.openlpmixin.OpenLPMixin
,openlp.core.common.registrymixin.RegistryMixin
,PyQt5.QtWidgets.QWidget
,openlp.core.ui.servicemanager.Ui_ServiceManager
,openlp.core.common.registryproperties.RegistryProperties
Manages the services. This involves taking text strings from plugins and adding them to the service. This service can then be zipped up with all the resources used into one OSZ or oszl file for use on any OpenLP v2 installation. Also handles the UI tasks of moving things up and down etc.
-
add_service_item
(item, rebuild=False, expand=None, replace=False, repaint=True, selected=False, position=-1)[source]¶ Add a Service item to the list
Parameters: - item – Service Item to be added
- rebuild – Do we need to rebuild the live display (Default False)
- expand – Override the default expand settings. (Tristate)
- replace – Is the service item a replacement (Default False)
- repaint – Do we need to repaint the service item list (Default True)
- selected – Has the item been selected (Default False)
- position – The position where the item is dropped (Default -1)
-
collapsed
(item)[source]¶ Record if an item is collapsed. Used when repainting the list to get the correct state.
Parameters: item – The service item to be checked
The Right click context menu from the Serviceitem list
Parameters: point – The location of the cursor.
-
create_basic_service
()[source]¶ Create the initial service array with the base items to be saved.
Returns: service array
-
drop_event
(event)[source]¶ Receive drop event and trigger an internal event to get the plugins to build and push the correct service item. The drag event payload carries the plugin name
Parameters: event – Handle of the event passed
-
expanded
(item)[source]¶ Record if an item is collapsed. Used when repainting the list to get the correct state.
Parameters: item – The service item to be checked
-
find_service_item
()[source]¶ Finds the first selected ServiceItem in the list and returns the position of the service_item_from_item and its selected child item. For example, if the third child item (in the Slidecontroller known as slide) in the second service item is selected this will return:
(1, 2)
-
load_last_file
()[source]¶ Load the last service item from the service manager when the service was last closed. Can be blank if there was no service present.
-
make_live
(row=-1)[source]¶ Send the current item to the Live slide controller
Parameters: row – Row number to be displayed if from preview. -1 is passed if the value is not set
-
make_preview
(field=None)[source]¶ Send the current item to the Preview slide controller :param field:
-
on_delete_from_service
(field=None)[source]¶ Remove the current ServiceItem from the list. :param field:
-
on_double_click_live
(field=None)[source]¶ Send the current item to the Live slide controller but triggered by a tablewidget click event. :param field:
-
on_load_service_clicked
(load_file=None)[source]¶ Loads the service file and saves the existing one it there is one unchanged.
Parameters: load_file – The service file to the loaded. Will be None is from menu so selection will be required.
-
on_move_selection_down
()[source]¶ Moves the cursor selection down the window. Called by the down arrow.
-
on_recent_service_clicked
(field=None)[source]¶ Load a recent file as the service triggered by mainwindow recent service list. :param field:
-
on_service_down
(field=None)[source]¶ Move the current ServiceItem one position down in the list. :param field:
-
on_service_end
(field=None)[source]¶ Move the current ServiceItem to the bottom of the list. :param field:
-
on_service_item_edit_form
(field=None)[source]¶ Opens a dialog to edit the service item and update the service display if changes are saved. :param field:
-
on_service_item_rename
(field=None)[source]¶ Opens a dialog to rename the service item.
Parameters: field – Not used, but PyQt needs this.
-
on_service_top
(field=None)[source]¶ Move the current ServiceItem to the top of the list. :param field:
-
on_service_up
(field=None)[source]¶ Move the current ServiceItem one position up in the list. :param field:
-
on_set_item
(message, field=None)[source]¶ Called by a signal to select a specific item and make it live usually from remote.
Parameters: - field –
- message – The data passed in from a remove message
-
on_single_click_preview
(field=None)[source]¶ If single click previewing is enabled, and triggered by a tablewidget click event, start a timeout to verify a double-click hasn’t triggered. :param field:
-
on_single_click_preview_timeout
()[source]¶ If a single click ok, but double click not triggered, send the current item to the Preview slide controller. :param field:
-
on_theme_combo_box_selected
(current_index)[source]¶ Set the theme for the current service.
Parameters: current_index – The combo box index for the selected item
-
on_timed_slide_interval
(field=None)[source]¶ Shows input dialog for enter interval in seconds for delay :param field:
-
preview_live
(unique_identifier, row)[source]¶ Called by the SlideController to request a preview item be made live and allows the next preview to be updated if relevant.
Parameters: - unique_identifier – Reference to the service_item
- row – individual row number
-
previous_item
(last_slide=False)[source]¶ Called by the SlideController to select the previous service item.
Parameters: last_slide – Is this the last slide in the service_item.
-
process_service_items
(service_items)[source]¶ Process all the array of service items loaded from the saved service
Parameters: service_items – list of service_items
-
regenerate_service_items
(changed=False)[source]¶ Rebuild the service list as things have changed and a repaint is the easiest way to do this.
Parameters: changed – True if the list has changed for new / removed items. False for a theme change.
-
remote_edit
(field=None)[source]¶ Triggers a remote edit to a plugin to allow item to be edited. :param field:
-
repaint_service_list
(service_item, service_item_child)[source]¶ Clear the existing service list and prepaint all the items. This is used when moving items as the move takes place in a supporting list, and when regenerating all the items due to theme changes.
Parameters: - service_item – The item which changed. (int)
- service_item_child – The child of the
service_item
, which will be selected. (int)
-
replace_service_item
(new_item)[source]¶ Using the service item passed replace the one with the same edit id if found.
Parameters: new_item – a new service item to up date an existing one.
-
save_file
(field=None)[source]¶ Save the current service file.
A temporary file is created so that we don’t overwrite the existing one and leave a mangled service file should there be an error when saving. Audio files are also copied into the service manager directory, and then packaged into the zip file.
-
save_file_as
(field=None)[source]¶ Get a file name and then call
ServiceManager.save_file()
to save the file.
-
save_local_file
()[source]¶ Save the current service file but leave all the file references alone to point to the current machine. This format is not transportable as it will not contain any files.
-
servicemanager_next_item
¶
-
servicemanager_previous_item
¶
-
servicemanager_set_item
¶
-
set_file_name
(file_name)[source]¶ Setter for service file.
Parameters: file_name – The service file name
-
set_item
(index)[source]¶ Makes a specific item in the service live.
Parameters: index – The index of the service item list to be actioned.
-
set_modified
(modified=True)[source]¶ Setter for property “modified”. Sets whether or not the current service has been modified.
Parameters: modified – Indicates if the service has new or removed items. Used to trigger a remote update.
-
supported_suffixes
(suffix_list)[source]¶ Adds Suffixes supported to the master list. Called from Plugins.
Parameters: suffix_list – New Suffix’s to be supported
-
theme_change
()[source]¶ The theme may have changed in the settings dialog so make sure the theme combo box is in the correct state.
-
-
class
openlp.core.ui.
ThemeForm
(parent)[source]¶ Bases:
PyQt5.QtWidgets.QWizard
,openlp.core.ui.themewizard.Ui_ThemeWizard
,openlp.core.common.registryproperties.RegistryProperties
This is the Theme Import Wizard, which allows easy creation and editing of OpenLP themes.
-
on_background_combo_box_current_index_changed
(index)[source]¶ Background style Combo box has changed.
-
on_current_id_changed
(page_id)[source]¶ Detects Page changes and updates as appropriate. :param page_id: current page number
Generate layout preview and display the form.
Set the footer colour value
Change state as Footer Area _position check box changed NOTE the font_footer_override is the inverse of the check box value
-
on_gradient_combo_box_current_index_changed
(index)[source]¶ Background gradient Combo box has changed.
-
on_main_position_check_box_state_changed
(value)[source]¶ Change state as Main Area _position check box changed NOTE the font_main_override is the inverse of the check box value
Handle the display and state of the Footer Area page.
-
update_lines_text
(lines)[source]¶ Updates the lines on a page on the wizard :param lines: then number of lines to be displayed
-
-
class
openlp.core.ui.
ThemeManager
(parent=None)[source]¶ Bases:
openlp.core.common.openlpmixin.OpenLPMixin
,openlp.core.common.registrymixin.RegistryMixin
,PyQt5.QtWidgets.QWidget
,openlp.core.ui.thememanager.Ui_ThemeManager
,openlp.core.common.registryproperties.RegistryProperties
Manages the orders of Theme.
-
change_global_from_screen
(index=-1)[source]¶ Change the global theme when a theme is double clicked upon in the Theme Manager list.
Parameters: index –
-
change_global_from_tab
()[source]¶ Change the global theme when it is changed through the Themes settings tab
-
check_if_theme_exists
(theme_name)[source]¶ Check if theme already exists and displays error message
Parameters: theme_name – Name of the Theme to test Returns: True or False if theme exists
-
check_list_state
(item, field=None)[source]¶ If Default theme selected remove delete button. Note for some reason a dummy field is required. Nothing is passed!
Parameters: - field –
- item – Service Item to process
-
clone_theme_data
(theme_data, new_theme_name)[source]¶ Takes a theme and makes a new copy of it as well as saving it.
Parameters: - theme_data – The theme to be used
- new_theme_name – The new theme name to save the data to
Build the Right Click Context menu and set state depending on the type of theme.
Parameters: point – The position of the mouse so the correct item can be found.
-
generate_and_save_image
(name, theme)[source]¶ Generate and save a preview image
Parameters: - name – The name of the theme.
- theme – The theme data object.
-
generate_image
(theme_data, force_page=False)[source]¶ Call the renderer to build a Sample Image
Parameters: - theme_data – The theme to generated a preview for.
- force_page – Flag to tell message lines per page need to be generated.
-
get_preview_image
(theme)[source]¶ Return an image representing the look of the theme
Parameters: theme – The theme to return the image for.
-
get_theme_data
(theme_name)[source]¶ Returns a theme object from an XML file
Parameters: theme_name – Name of the theme to load from file Returns: The theme object.
-
load_first_time_themes
()[source]¶ Imports any themes on start up and makes sure there is at least one theme
-
load_themes
()[source]¶ Loads the theme lists and triggers updates across the whole system using direct calls or core functions and events for the plugins. The plugins will call back in to get the real list if they want it.
-
on_add_theme
(field=None)[source]¶ Loads a new theme with the default settings and then launches the theme editing form for the user to make their customisations. :param field:
-
on_edit_theme
(field=None)[source]¶ Loads the settings for the theme that is to be edited and launches the theme editing form so the user can make their changes. :param field:
-
on_import_theme
(field=None)[source]¶ Opens a file dialog to select the theme file(s) to import before attempting to extract OpenLP themes from those files. This process will only load version 2 themes. :param field:
-
over_write_message_box
(theme_name)[source]¶ Display a warning box to the user that a theme already exists
Parameters: theme_name – Name of the theme. Returns: Confirm if the theme is to be overwritten.
-
save_theme
(theme, image_from, image_to)[source]¶ Called by theme maintenance Dialog to save the theme and to trigger the reload of the theme list
Parameters: - theme – The theme data object.
- image_from – Where the theme image is currently located.
- image_to – Where the Theme Image is to be saved to
-
-
class
openlp.core.ui.
ServiceItemEditForm
[source]¶ Bases:
PyQt5.QtWidgets.QDialog
,openlp.core.ui.serviceitemeditdialog.Ui_ServiceItemEditDialog
,openlp.core.common.registryproperties.RegistryProperties
This is the form that is used to edit the verses of the song.
-
on_current_row_changed
(row)[source]¶ Called when the currentRow has changed.
Parameters: row – The row number (int).
Delete the current row.
Move the current row down in the list
Move the current row up in the list.
-
-
class
openlp.core.ui.
FirstTimeForm
(parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QWizard
,openlp.core.ui.firsttimewizard.UiFirstTimeWizard
,openlp.core.common.registryproperties.RegistryProperties
This is the Theme Import Wizard, which allows easy creation and editing of OpenLP themes.
-
get_next_page_id
()[source]¶ Returns the id of the next FirstTimePage to go to based on enabled plugins
-
initialize
(screens)[source]¶ Set up the First Time Wizard
Parameters: screens – The screens detected by OpenLP
Process the triggering of the cancel button.
Process the triggering of the “Cancel” button on the No Internet page.
Process the triggering of the “Finish” button on the No Internet page.
-
-
class
openlp.core.ui.
FirstTimeLanguageForm
(parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QDialog
,openlp.core.ui.firsttimelanguagedialog.Ui_FirstTimeLanguageDialog
The language selection dialog.
-
class
openlp.core.ui.
Display
(parent)[source]¶ Bases:
PyQt5.QtWidgets.QGraphicsView
This is a general display screen class. Here the general display settings will done. It will be used as specialized classes by Main Display and Preview display.
-
class
openlp.core.ui.
ServiceNoteForm
[source]¶ Bases:
PyQt5.QtWidgets.QDialog
,openlp.core.common.registryproperties.RegistryProperties
This is the form that is used to edit the verses of the song.
-
class
openlp.core.ui.
ThemeLayoutForm
(parent)[source]¶ Bases:
PyQt5.QtWidgets.QDialog
,openlp.core.ui.themelayoutdialog.Ui_ThemeLayoutDialog
The exception dialog
-
class
openlp.core.ui.
FileRenameForm
[source]¶ Bases:
PyQt5.QtWidgets.QDialog
,openlp.core.ui.filerenamedialog.Ui_FileRenameDialog
,openlp.core.common.registryproperties.RegistryProperties
The file rename dialog
-
class
openlp.core.ui.
StartTimeForm
[source]¶ Bases:
PyQt5.QtWidgets.QDialog
,openlp.core.ui.starttimedialog.Ui_StartTimeDialog
,openlp.core.common.registryproperties.RegistryProperties
The start time dialog
-
class
openlp.core.ui.
MainDisplay
(parent)[source] Bases:
openlp.core.common.openlpmixin.OpenLPMixin
,openlp.core.ui.maindisplay.Display
,openlp.core.common.registryproperties.RegistryProperties
This is the display screen as a specialized class from the Display class
-
alert
(text, location)[source] Display an alert.
Parameters: - text – The text to be displayed.
- location – Where on the screen is the text to be displayed
-
build_html
(service_item, image_path='')[source] Store the service_item and build the new HTML from it. Add the HTML to the display
Parameters: - service_item – The Service item to be used
- image_path – Where the image resides.
-
change_window_level
(window)[source] Changes the display window level on Mac OS X so that the main window can be brought into focus but still allow the main display to be above the menu bar and dock when it in focus.
Parameters: window – Window from our application that focus changed to or None if outside our application
-
close
()[source] Remove registered function on close.
-
closeEvent
(event)[source] Catch the close event, and check that the close event is triggered by OpenLP closing the display. On Windows this event can be triggered by pressing ALT+F4, which we want to ignore.
Parameters: event – The triggered event
-
css_changed
()[source] We need to rebuild the CSS on the live display.
-
direct_image
(path, background)[source] API for replacement backgrounds so Images are added directly to cache.
Parameters: - path – Path to Image
- background – The background color
-
display_image
(image)[source] Display an image, as is.
Parameters: image – The image to be displayed
-
footer
(text)[source] Display the Footer
Parameters: text – footer text to be displayed
-
hide_display
(mode=3)[source] Hide the display by making all layers transparent Store the images so they can be replaced when required
Parameters: mode – How the screen is to be hidden
-
image
(path)[source] Add an image as the background. The image has already been added to the cache.
Parameters: path – The path to the image to be displayed. Note, the path is only passed to identify the image. If the image has changed it has to be re-added to the image manager.
-
preview
()[source] Generates a preview of the image displayed.
-
reset_image
()[source] Reset the background image to the service item image. Used after the image plugin has changed the background.
-
retranslateUi
()[source] Setup the interface translation strings.
-
set_transparency
(enabled)[source] Set the transparency of the window
Parameters: enabled – Is transparency enabled
-
setup
()[source] Set up and build the output screen
-
shake_web_view
()[source] Resizes the web_view a bit to force an update. Workaround for bug #1531319, should not be needed with PyQt 5.6.
-
show_display
()[source] Show the stored layers so the screen reappears as it was originally. Make the stored images None to release memory.
-
text
(slide, animate=True)[source] Add the slide text from slideController
Parameters: - slide – The slide text to be displayed
- animate – Perform transitions if applicable when setting the text
-
-
class
openlp.core.ui.
SlideController
(parent)[source] Bases:
openlp.core.ui.slidecontroller.DisplayController
,openlp.core.common.registryproperties.RegistryProperties
SlideController is the slide controller widget. This widget is what the user uses to control the displaying of verses/slides/etc on the screen.
-
add_service_item
(item)[source] Method to install the service item into the controller Called by plugins
Parameters: item – The current service item
-
add_service_manager_item
(item, slide_no)[source] Method to install the service item into the controller and request the correct toolbar for the plugin. Called by
ServiceManager
Parameters: - item – The current service item
- slide_no – The slide number to select
-
blank_plugin
()[source] Blank/Hide the display screen within a plugin if required.
-
enable_live_tool_bar
(item)[source] Allows the live toolbar to be customised
Parameters: item – The current service item
-
enable_preview_tool_bar
(item)[source] Allows the Preview toolbar to be customised
Parameters: item – The current service item
-
enable_tool_bar
(item)[source] Allows the toolbars to be reconfigured based on Controller Type and ServiceItem Type
Parameters: item – current service item being processed
-
grab_maindisplay
()[source] Creates an image of the current screen and updates the preview frame.
-
hide_mode
()[source] Determine what the hide mode should be according to the blank button
-
hide_plugin
(hide)[source] Tell the plugin to hide the display screen.
-
initialise
()[source] Initialise the UI elements of the controller
-
main_display_set_background
()[source] Allow the main display to blank the main display at startup time
-
on_audio_time_remaining
(time)[source] Update how much time is remaining
Parameters: time – the time remaining
-
on_blank_display
(checked=None)[source] Handle the blank screen button actions
Parameters: checked – the new state of the of the widget
-
on_controller_size_changed
(width)[source] Change layout of display control buttons on controller size change
Parameters: width – the new width of the display
-
on_edit_song
(field=None)[source] From the preview display requires the service Item to be editied
-
on_go_live
(field=None)[source] If preview copy slide item to live controller from Preview Controller
-
on_hide_display
(checked=None)[source] Handle the Hide screen button This toggles the desktop screen.
Parameters: checked – the new state of the of the widget
-
on_hide_display_enable
(checked=None)[source] Handle the on_hide_display_enable This only enables the desktop screen.
Parameters: checked – the new state of the of the widget
-
on_media_close
()[source] Respond to a request to close the Video
-
on_media_start
(item)[source] Respond to the arrival of a media service item
Parameters: item – The service item to be processed
-
on_next_track_clicked
()[source] Go to the next track when next is clicked
-
on_play_slides_loop
(checked=None)[source] Start or stop ‘Play Slides in Loop’
Parameters: checked – is the check box checked.
-
on_play_slides_once
(checked=None)[source] Start or stop ‘Play Slides to End’
Parameters: checked – is the check box checked.
-
on_preview_add_to_service
(field=None)[source] From the preview display request the Item to be added to service
-
on_preview_double_click
(field=None)[source] Triggered when a preview slide item is doubleclicked
-
on_slide_blank
()[source] Handle the slidecontroller blank event
-
on_slide_change
(row)[source] The slide has been changed. Update the slidecontroller accordingly
Parameters: row – Row to be selected
-
on_slide_selected
(field=None)[source] Slide selected in controller Note for some reason a dummy field is required. Nothing is passed!
-
on_slide_selected_index
(message)[source] Go to the requested slide
Parameters: message – remote message to be processed.
-
on_slide_selected_next
(wrap=None)[source] Go to the next slide.
Parameters: wrap – Are we wrapping round the service item
-
on_slide_selected_next_action
(checked)[source] Wrapper function from create_action so we can throw away the incorrect parameter
Parameters: checked – the new state of the of the widget
-
on_slide_selected_previous
(field=None)[source] Go to the previous slide.
-
on_slide_unblank
()[source] Handle the slidecontroller unblank event.
-
on_song_bar_handler
()[source] Some song handler
-
on_start_loop
()[source] Start the timer loop running and store the timer id
-
on_stop_loop
()[source] Stop the timer loop running
-
on_theme_display
(checked=None)[source] Handle the Theme screen button
Parameters: checked – the new state of the of the widget
-
on_toggle_loop
()[source] Toggles the loop state.
-
on_track_triggered
(field=None)[source] Start playing a track
-
post_set_up
()[source] Call by bootstrap functions
-
preview_size_changed
()[source] Takes care of the SlidePreview’s size. Is called when one of the the splitters is moved or when the screen size is changed. Note, that this method is (also) called frequently from the mainwindow paintEvent.
-
receive_spin_delay
()[source] Adjusts the value of the
delay_spin_box
to the given one.
-
refresh_service_item
()[source] Method to update the service item if the screen has changed
-
replace_service_manager_item
(item)[source] Replacement item following a remote edit. This action also takes place when a song that is sent to live from Service Manager is edited.
Parameters: item – The current service item
-
screen_size_changed
()[source] Settings dialog has changed the screen size of adjust output and screen previews.
-
service_next
(field=None)[source] Live event to select the next service item from the service manager.
-
service_previous
(field=None)[source] Live event to select the previous service item from the service manager.
-
set_audio_items_visibility
(visible)[source] Set the visibility of the audio stuff
-
set_audio_pause_clicked
(checked)[source] Pause the audio player
Parameters: checked – is the check box checked.
-
set_blank_menu
(visible=True)[source] Set the correct menu type dependent on the service item type
Parameters: visible – Do I need to hide the menu?
-
set_live_hot_keys
(parent=None)[source] Set the live hotkeys
Parameters: parent – The parent UI object for actions to be added to.
-
slide_selected
(start=False)[source] Generate the preview when you click on a slide. If this is the Live Controller also display on the screen
Parameters: start –
-
timerEvent
(event)[source] If the timer event is for this window select next slide
Parameters: event – The triggered event
-
toggle_display
(action)[source] Toggle the display settings triggered from remote messages.
Parameters: action – The blank action to be processed.
-
update_preview
()[source] This updates the preview frame, for example after changing a slide or using Blank to Theme.
-
update_slide_limits
()[source] Updates the Slide Limits variable from the settings.
-
-
class
openlp.core.ui.
DisplayController
(parent)[source]¶ Bases:
PyQt5.QtWidgets.QWidget
Controller is a general display controller widget.
-
class
openlp.core.ui.
GeneralTab
(parent)[source]¶ Bases:
openlp.core.lib.settingstab.SettingsTab
GeneralTab is the general settings tab in the settings dialog.
Toggle screen state depending on check box state.
Parameters: checked – The state of the check box (boolean).
-
class
openlp.core.ui.
ThemesTab
(parent)[source]¶ Bases:
openlp.core.lib.settingstab.SettingsTab
ThemesTab is the theme settings tab in the settings dialog.
Set the theme level
Set the theme level
Set the theme level
-
class
openlp.core.ui.
AdvancedTab
(parent)[source]¶ Bases:
openlp.core.lib.settingstab.SettingsTab
The
AdvancedTab
manages the advanced settings tab including the UI and the loading and saving of the displayed settings.-
on_alternate_rows_check_box_toggled
(checked)[source]¶ Notify user about required restart.
Parameters: checked – The state of the check box (boolean).
Cancel the data directory location change
-
on_data_directory_copy_check_box_toggled
()[source]¶ Copy existing data when you change your data directory.
-
on_data_directory_path_edit_path_changed
(new_data_path)[source]¶ Browse for a new data directory location.
Stop at the end either top ot bottom
Advance to the next service item
Revert to the default service name.
Wrap round the service item
-
-
class
openlp.core.ui.
PluginForm
(parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QDialog
,openlp.core.ui.plugindialog.Ui_PluginViewDialog
,openlp.core.common.registryproperties.RegistryProperties
The plugin form provides user control over the plugins OpenLP uses.
-
class
openlp.core.ui.
FormattingTagForm
(parent)[source]¶ Bases:
PyQt5.QtWidgets.QDialog
,openlp.core.ui.formattingtagdialog.Ui_FormattingTagDialog
,openlp.core.ui.formattingtagcontroller.FormattingTagController
The
FormattingTagForm
manages the settings tab .
-
class
openlp.core.ui.
ShortcutListForm
(parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QDialog
,openlp.core.ui.shortcutlistdialog.Ui_ShortcutListDialog
,openlp.core.common.registryproperties.RegistryProperties
The shortcut list dialog
Save the new alternate shortcut.
Restore the defaults of this action.
Restore the defaults of this action.
-
on_current_item_changed
(item=None, previousItem=None)[source]¶ A item has been pressed. We adjust the button’s text to the action’s shortcut which is encapsulate in the item.
The custom shortcut radio button was clicked, thus we have to restore the custom shortcuts by calling those functions triggered by button clicks.
The default radio button has been clicked, which means we have to make sure, that we use the default shortcuts for the action.
-
on_item_double_clicked
(item, column)[source]¶ A item has been double clicked. The
primaryPushButton
will be checked and the item’s shortcut will be displayed.
Save the new primary shortcut.
-
class
openlp.core.ui.
FormattingTagController
[source]¶ Bases:
object
The
FormattingTagController
manages the non UI functions .-
end_tag_changed
(start_html, end_html)[source]¶ Validate the HTML tags when the end tag has been changed.
- start_html
- The start html tag.
- end_html
- The end html tag.
Save the new tags if they are valid.
-
start_html_to_end_html
(start_html)[source]¶ Return the end HTML for a given start HTML or None if invalid.
- start_html
- The start html tag.
-
-
class
openlp.core.ui.
SingleColumnTableWidget
(parent)[source]¶ Bases:
PyQt5.QtWidgets.QTableWidget
Class to for a single column table widget to use for the verse table widget.
-
class
openlp.core.ui.
ProjectorManager
(parent=None, projectordb=None)[source]¶ Bases:
openlp.core.common.openlpmixin.OpenLPMixin
,openlp.core.common.registrymixin.RegistryMixin
,PyQt5.QtWidgets.QWidget
,openlp.core.ui.projector.manager.UiProjectorManager
,openlp.core.common.registryproperties.RegistryProperties
Manage the projectors.
-
add_projector
(projector, start=False)[source]¶ Builds manager list item, projector thread, and timer for projector instance.
Parameters: - projector – Projector instance to add
- start – Start projector if True
-
add_projector_from_wizard
(ip, opts=None)[source]¶ Add a projector from the edit dialog
Parameters: - ip – IP address of new record item to find
- opts – Needed by PyQt5
-
authentication_error
(name)[source]¶ Display warning dialog when attempting to connect with invalid pin
Parameters: name – Name from QListWidgetItem
Build the Right Click Context menu and set state.
Parameters: point – The position of the mouse so the correct item can be found.
-
edit_projector_from_wizard
(projector)[source]¶ Update projector from the wizard edit page
Parameters: projector – Projector() instance of projector with updated information
-
no_authentication_error
(name)[source]¶ Display warning dialog when pin saved for item but projector does not require pin.
Parameters: name – Name from QListWidgetItem
-
on_add_projector
(opt=None)[source]¶ Calls edit dialog to add a new projector to the database
Parameters: opt – Needed by PyQt5
-
on_blank_projector
(opt=None)[source]¶ Calls projector thread to send blank screen command
Parameters: opt – Needed by PyQt5
-
on_connect_projector
(opt=None)[source]¶ Calls projector thread to connect to projector
Parameters: opt – Needed by PyQt5
-
on_delete_projector
(opt=None)[source]¶ Deletes a projector from the list and the database
Parameters: opt – Needed by PyQt5
-
on_disconnect_projector
(opt=None)[source]¶ Calls projector thread to disconnect from projector
Parameters: opt – Needed by PyQt5
-
on_doubleclick_item
(item, opt=None)[source]¶ When item is doubleclicked, will connect to projector.
Parameters: - item – List widget item for connection.
- opt – Needed by PyQt5
-
on_edit_projector
(opt=None)[source]¶ Calls edit dialog with selected projector to edit information
Parameters: opt – Needed by PyQt5
-
on_poweroff_projector
(opt=None)[source]¶ Calls projector link to send Power Off command
Parameters: opt – Needed by PyQt5
-
on_poweron_projector
(opt=None)[source]¶ Calls projector link to send Power On command
Parameters: opt – Needed by PyQt5
-
on_select_input
(opt=None, edit=False)[source]¶ Builds menu for ‘Select Input’ option, then calls the selected projector item to change input source.
Parameters: opt – Needed by PyQt5
-
on_show_projector
(opt=None)[source]¶ Calls projector thread to send open shutter command
Parameters: opt – Needed by PyQt5
-
-
class
openlp.core.ui.
ProjectorTab
(parent)[source]¶ Bases:
openlp.core.lib.settingstab.SettingsTab
Openlp Settings -> Projector settings
-
class
openlp.core.ui.
ProjectorEditForm
(parent=None, projectordb=None)[source]¶ Bases:
PyQt5.QtWidgets.QDialog
,openlp.core.ui.projector.editform.Ui_ProjectorEditForm
Class to add or edit a projector entry in the database.
- Fields that are editable:
- ip = Column(String(100)) port = Column(String(8)) pin = Column(String(20)) name = Column(String(20)) location = Column(String(30)) notes = Column(String(200))
-
editProjector
¶
-
newProjector
¶