screen

The screen module provides management functionality for a machines’ displays.

class openlp.core.lib.screen.ScreenList[source]

Bases: object

Wrapper to handle the parameters of the display screen.

To get access to the screen list call ScreenList().

add_screen(screen)[source]

Add a screen to the list of known screens.

Parameters:screen

A dict with the screen properties:

{
    'primary': True,
    'number': 0,
    'size': PyQt5.QtCore.QRect(0, 0, 1024, 768)
}
classmethod create(desktop)[source]

Initialise the screen list.

Parameters:desktop – A QDesktopWidget object.
get_screen_list()[source]

Returns a list with the screens. This should only be used to display available screens to the user:

['Screen 1 (primary)', 'Screen 2']
load_screen_settings()[source]

Loads the screen size and the monitor number from the settings.

remove_screen(number)[source]

Remove a screen from the list of known screens.

Parameters:number – The screen number (int).
reset_current_display()[source]

Replace the current values with the correct values, as the user wants to use the correct screen attributes.

screen_count_changed(changed_screen=-1)[source]

Called when a screen has been added or removed.

changed_screen
The screen’s number which has been (un)plugged.
screen_exists(number)[source]

Confirms a screen is known.

Parameters:number – The screen number (int).
screen_resolution_changed(number)[source]

Called when the resolution of a screen has changed.

number
The number of the screen, which size has changed.
set_current_display(number)[source]

Set up the current screen dimensions.

Parameters:number – The screen number (int).
set_override_display()[source]

Replace the current size with the override values, as the user wants to have their own screen attributes.

which_screen(window)[source]

Return the screen number that the centre of the passed window is in.

Parameters:window – A QWidget we are finding the location of.