adsfolio.gui.search_completion

Suggest field names and values while the user types a search query.

class adsfolio.gui.search_completion.SearchCompleter(line_edit, values)[source]

Bases: PySide6.QtCore.QObject

Show a popup of completions for the term under the cursor.

A word without a colon gets field-name suggestions: f suggests first_author: and filename:. After author:, first_author:, journal:, or year:, values supplies the suggestions. Choosing a suggestion replaces only that term.

Parameters:
  • line_edit (QLineEdit) – Search field.

  • values (Callable[[str], Sequence[str]]) – Return the stored values of one field key, for example author names.

staticMetaObject = PySide6.QtCore.QMetaObject("SearchCompleter" inherits "QObject": )