seriesmarker.gui.search_dialog module

class SearchDialog(parent=None)[source]

Bases: PySide.QtGui.QDialog

Displays a dialog to search for series.

__init__(parent=None)[source]

Creates a new dialog instance.

Parameters:parent (PySide.QtGui.QWidget) – The parent widget of the dialog.
accept()[source]

Picks the result of the search.

Called whenever the dialog should accept a result. The result is the latest selected series by the user. For that series, additional data is loaded from TheTVDB and stored for further usage.

Todo

Accept button of SearchDialog should be disable while search is ongoing, or no valid result has been selected yet.

on_search_button_clicked()[source]

Performs the search for series.

Called whenever a search is triggered. Gets a search string from the dialog’s text field and uses the tvdb module to retrieve matching series. Results are being added to the dialog’s model for displaying them.

result_value()[source]

Passes the final result of the search.

Returns:The pytvdbapi.api.Show that was selected.

Todo

Method may be omitted in favor of public attribute if unittest.mock offers a way to set it for testing.

staticMetaObject = <PySide.QtCore.QMetaObject object>