toolbar

Provide common toolbar handling for OpenLP

class openlp.core.lib.toolbar.OpenLPToolbar(parent)[source]

Bases: PyQt5.QtWidgets.QToolBar

Lots of toolbars around the place, so it makes sense to have a common way to manage them. This is the base toolbar class.

add_toolbar_action(name, **kwargs)[source]

A method to help developers easily add a button to the toolbar. A new QAction is created by calling create_action(). The action is added to the toolbar and the toolbar is set as parent. For more details please look at openlp.core.lib.ui.create_action()

add_toolbar_widget(widget)[source]

Add a widget and store it’s handle under the widgets object name.

set_widget_enabled(widgets, enabled=True)[source]

Set the enabled state for a widget or a list of widgets.

Parameters:
  • widgets – A list of string with widget object names.
  • enabled – The new state as bool.
set_widget_visible(widgets, visible=True)[source]

Set the visibility for a widget or a list of widgets.

Parameters:
  • widgets – A list of string with widget object names.
  • visible – The new state as bool.