mainwindow

This is the main window, where all the action happens.

class openlp.core.ui.mainwindow.MainWindow[source]

Bases: PyQt5.QtWidgets.QMainWindow, openlp.core.ui.mainwindow.Ui_MainWindow, openlp.core.common.registryproperties.RegistryProperties

The main window.

add_recent_file(filename)[source]

Adds a service to the list of recently used files.

Parameters:filename – The service filename to add
app_startup()[source]

Give all the plugins a chance to perform some tasks at startup

bootstrap_post_set_up()[source]

process the bootstrap post setup request

change_data_directory()[source]

Change the data directory.

clean_up(save_settings=True)[source]

Runs all the cleanup code before OpenLP shuts down.

Parameters:save_settings – Switch to prevent saving settings. Defaults to True.
clear_recent_file_menu()[source]

Clears the recent files.

closeEvent(event)[source]

Hook to close the main window and display windows on exit

default_theme_changed()[source]

Update the default theme indicator in the status bar

display_progress_bar(size)[source]

Make Progress bar visible and set size

error_message(title, message)[source]

Display an error message

Parameters:
  • title – The title of the warning box.
  • message – The message to be displayed.
finished_progress_bar()[source]

Trigger it’s removal after 2.5 second

first_time()[source]

Import themes if first time

increment_progress_bar()[source]

Increase the Progress Bar value by 1

information_message(title, message)[source]

Display an informational message

Parameters:
  • title – The title of the warning box.
  • message – The message to be displayed.
is_display_blank()[source]

Check and display message if screen blank on setup.

load_settings()[source]

Load the main window settings.

on_about_item_clicked()[source]

Show the About form

on_first_time_wizard_clicked()[source]

Re-run the first time wizard. Prompts the user for run confirmation.If wizard is run, songs, bibles and themes are imported. The default theme is changed (if necessary). The plugins in pluginmanager are set active/in-active to match the selection in the wizard.

on_formatting_tag_item_clicked()[source]

Show the Settings dialog

on_help_clicked()[source]

If is_macosx or is_win, open the local OpenLP help file. Use the Online manual in other cases. (Linux)

on_help_web_site_clicked()[source]

Load the OpenLP website

on_media_tool_box_changed(index)[source]

Focus a widget when the media toolbox changes.

on_mode_default_item_clicked()[source]

Put OpenLP into “Default” view mode.

on_mode_live_item_clicked()[source]

Put OpenLP into “Live” view mode.

on_mode_setup_item_clicked()[source]

Put OpenLP into “Setup” view mode.

on_plugin_item_clicked()[source]

Show the Plugin form

on_search_shortcut_triggered()[source]

Called when the search shortcut has been pressed.

on_settings_configure_iem_clicked()[source]

Show the Settings dialog

on_settings_export_item_clicked()[source]

Export settings to a .conf file in INI format

on_settings_import_item_clicked()[source]

Import settings from an export INI file

on_settings_shortcuts_item_clicked()[source]

Show the shortcuts dialog

on_tools_open_data_folder_clicked()[source]

Open data folder

on_update_theme_images()[source]

Updates the new theme preview images.

open_cmd_line_files(filename)[source]

Open files passed in through command line arguments

openlp_version_check
paintEvent(event)[source]

We need to make sure, that the SlidePreview’s size is correct.

restore_current_media_manager_item()[source]

Called on start up to restore the last active media plugin.

save_settings()[source]

Save the main window settings.

screen_changed()[source]

The screen has changed so we have to update components such as the renderer.

set_copy_data(copy_data)[source]

Set the flag to copy the data

set_live_panel_visibility(visible)[source]

Sets the visibility of the live panel including saving the setting and updating the menu.

Parameters:visible – A bool giving the state to set the panel to True - Visible False - Hidden
set_lock_panel(lock)[source]

Sets the ability to stop the toolbars being changed.

set_new_data_path(new_data_path)[source]

Set the new data path

set_preview_panel_visibility(visible)[source]

Sets the visibility of the preview panel including saving the setting and updating the menu.

Parameters:visible – A bool giving the state to set the panel to True - Visible False - Hidden
set_service_modified(modified, file_name)[source]

This method is called from the ServiceManager to set the title of the main window.

Parameters:
  • modified – Whether or not this service has been modified.
  • file_name – The file name of the service file.
set_view_mode(media=True, service=True, theme=True, preview=True, live=True, projector=True, mode='')[source]

Set OpenLP to a different view mode.

show()[source]

Show the main form, as well as the display form

show_status_message(message)[source]

Show a message in the status bar

timerEvent(event)[source]

Remove the Progress bar from view.

toggle_media_manager()[source]

Toggle the visibility of the media manager

toggle_projector_manager()[source]

Toggle visibility of the projector manager

toggle_service_manager()[source]

Toggle the visibility of the service manager

toggle_theme_manager()[source]

Toggle the visibility of the theme manager

update_recent_files_menu()[source]

Updates the recent file menu with the latest list of service files accessed.

version_notice(version)[source]

Notifies the user that a newer version of OpenLP is available. Triggered by delay thread and cannot display popup.

Parameters:version – The Version to be displayed.
warning_message(title, message)[source]

Display a warning message

Parameters:
  • title – The title of the warning box.
  • message – The message to be displayed.
class openlp.core.ui.mainwindow.Ui_MainWindow[source]

Bases: object

This is the UI part of the main window.

retranslateUi(main_window)[source]

Set up the translation system

setupUi(main_window)[source]

Set up the user interface