mediaitem

class openlp.plugins.custom.lib.mediaitem.CustomMediaItem(parent, plugin)[source]

Bases: openlp.core.lib.mediamanageritem.MediaManagerItem

This is the custom media manager item for Custom Slides.

add_end_header_bar()[source]

Add the Custom End Head bar and register events and functions

config_update()[source]

Config has been updated so reload values

create_from_service_item(item)[source]

Create a custom slide from a text service item

Parameters:item – the service item to be converted to a Custom item
custom_add_to_service
custom_go_live
generate_slide_data(service_item, item=None, xml_version=False, remote=False, context=2)[source]

Generate the slide data. Needs to be implemented by the plugin. :param service_item: To be updated :param item: The custom database item to be used :param xml_version: No used :param remote: Is this triggered by the Preview Controller or Service Manager. :param context: Why is this item required to be build (Default Service).

initialise()[source]

Initialise the UI so it can provide Searches

load_list(custom_slides, target_group=None)[source]
Parameters:
  • custom_slides
  • target_group
on_clear_text_button_click()[source]

Clear the search text.

on_delete_click()[source]

Remove a custom item from the list and database

on_edit_click()[source]

Edit a custom item

on_focus()[source]

Set the focus

on_new_click()[source]

Handle the New item event

on_remote_edit(custom_id, preview=False)[source]

Called by ServiceManager or SlideController by event passing the custom Id in the payload along with an indicator to say which type of display is required.

Parameters:
  • custom_id – The id of the item to be edited
  • preview – Do we need to update the Preview after the edit. (Default False)
on_search_text_button_clicked()[source]

Search the plugin database

on_search_text_edit_changed(text)[source]

If search as type enabled invoke the search on each key press. If the Title is being searched do not start until 2 characters have been entered.

Parameters:text – The search text
retranslateUi()[source]
search(string, show_error)[source]

Search the database for a given item.

Parameters:
  • string – The search string
  • show_error – The error string to be show.
service_load(item)[source]

Triggered by a custom item being loaded by the service manager.

Parameters:item – The service Item from the service to load found in the database.
setup_item()[source]

Do some additional setup.

class openlp.plugins.custom.lib.mediaitem.CustomSearch[source]

Bases: object

An enumeration for custom search methods.

Themes = 2
Titles = 1