listpreviewwidget

The listpreviewwidget is a widget that lists the slides in the slide controller. It is based on a QTableWidget but represents its contents in list form.

class openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget(parent, screen_ratio)[source]

Bases: PyQt5.QtWidgets.QTableWidget, openlp.core.common.registryproperties.RegistryProperties

A special type of QTableWidget which lists the slides in the slide controller

Parameters:
  • parent
  • screen_ratio
change_slide(slide)[source]

Switches to the given row.

current_slide_number()[source]

Returns the position of the currently active item. Will return -1 if the widget is empty.

replace_service_item(service_item, width, slide_number)[source]

Replace the current preview items with the ones in service_item and display the given slide

Parameters:
  • service_item – The service item to insert
  • width – The width of the column
  • slide_number – The slide number to pre-select
resizeEvent(event)[source]

Overloaded method from QTableWidget. Will recalculate the layout.

row_resized(row, old_height, new_height)[source]

Will scale non-image slides.

screen_size_changed(screen_ratio)[source]

This method is called whenever the live screen size changes, which then makes a layout recalculation necessary

Parameters:screen_ratio – The new screen ratio
slide_count()[source]

Returns the number of slides this widget holds.