searchedit

class openlp.core.lib.searchedit.SearchEdit(parent, settings_section)[source]

Bases: PyQt5.QtWidgets.QLineEdit

This is a specialised QLineEdit with a “clear” button inside for searches.

cleared
current_search_type()[source]

Readonly property to return the current search type.

resizeEvent(event)[source]

Reimplemented method to react to resizing of the widget.

Parameters:event – The event that happened.
searchTypeChanged
set_current_search_type(identifier)[source]

Set a new current search type.

Parameters:identifier – The search type identifier (int).
set_search_types(items)[source]

A list of tuples to be used in the search type menu. The first item in the list will be preselected as the default.

param items:

The list of tuples to use. The tuples should contain an integer identifier, an icon (QIcon instance or string) and a title for the item in the menu. In short, they should look like this:

    (<identifier>, <icon>, <title>, <place holder text>)

For instance::

    (1, <QIcon instance>, "Titles", "Search Song Titles...")

Or::

    (2, ":/songs/authors.png", "Authors", "Search Authors...")