slidecontroller

The slidecontroller module contains the most important part of OpenLP - the slide controller

class openlp.core.ui.slidecontroller.DisplayController(parent)[source]

Bases: PyQt5.QtWidgets.QWidget

Controller is a general display controller widget.

send_to_plugins(*args)[source]

This is the generic function to send signal for control widgets, created from within other plugins This function is needed to catch the current controller

Parameters:args – Arguments to send to the plugins
class openlp.core.ui.slidecontroller.InfoLabel[source]

Bases: PyQt5.QtWidgets.QLabel

InfoLabel is a subclassed QLabel. Created to provide the ablilty to add a ellipsis if the text is cut off. Original source: https://stackoverflow.com/questions/11446478/pyside-pyqt-truncate-text-in-qlabel-based-on-minimumsize

paintEvent(event)[source]

Reimplemented to allow the drawing of elided text if the text is longer than the width of the label

setText(text)[source]

Reimplemented to set the tool tip text.

class openlp.core.ui.slidecontroller.LiveController(parent)[source]

Bases: openlp.core.common.registrymixin.RegistryMixin, openlp.core.common.openlpmixin.OpenLPMixin, openlp.core.ui.slidecontroller.SlideController

Set up the Live Controller.

bootstrap_post_set_up()[source]

process the bootstrap post setup request

slidecontroller_live_next
slidecontroller_live_previous
slidecontroller_live_set
slidecontroller_toggle_display
class openlp.core.ui.slidecontroller.PreviewController(parent)[source]

Bases: openlp.core.common.registrymixin.RegistryMixin, openlp.core.common.openlpmixin.OpenLPMixin, openlp.core.ui.slidecontroller.SlideController

Set up the Preview Controller.

bootstrap_post_set_up()[source]

process the bootstrap post setup request

slidecontroller_preview_next
slidecontroller_preview_previous
slidecontroller_preview_set
class openlp.core.ui.slidecontroller.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.