maindisplay¶
The maindisplay
module provides the functionality to display screens and play multimedia within OpenLP.
Some of the code for this form is based on the examples at:
- `http://www.steveheffernan.com/html5-video-player/demo-video-player.html`_
- `http://html5demos.com/two-videos`_
-
class
openlp.core.ui.maindisplay.
AudioPlayer
(parent)[source]¶ Bases:
openlp.core.common.openlpmixin.OpenLPMixin
,PyQt5.QtCore.QObject
This Class will play audio only allowing components to work with a soundtrack independent of the user interface.
-
add_to_playlist
(file_names)[source]¶ Add another file to the playlist.
Parameters: file_names – A list with files to be added to the playlist.
-
position_changed
¶
-
-
class
openlp.core.ui.maindisplay.
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.maindisplay.
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.
-