gui.ui.tab_keyword_ui

File:

EuljiroBible/gui/ui/tab_keyword_ui.py

Author:

Benjamin Jaedon Choi - https://github.com/saintbenjamin

Affiliated Church:

The Eulji-ro Presbyterian Church [대한예수교장로회(통합) 을지로교회]

Address:

The Eulji-ro Presbyterian Church, 24-10, Eulji-ro 20-gil, Jung-gu, Seoul 04549, South Korea

Telephone:

+82-2-2266-3070

E-mail:

euljirochurch [at] G.M.A.I.L. (replace [at] with @ and G.M.A.I.L as you understood.)

License:

MIT License with Attribution Requirement (see LICENSE file for details); Copyright (c) 2025 The Eulji-ro Presbyterian Church.

Defines the UI layout and interaction hooks for the keyword-based search tab in EuljiroBible.

class gui.ui.tab_keyword_ui.TabKeywordUI[source]

Bases: object

UI builder mixin for the keyword search tab.

This class constructs the widget layout and connects UI events for keyword searching, including version selection, keyword input, search mode toggles, result table display, summary output, and overlay export controls.

The actual business logic (search, export, clearing output) is delegated to the owning tab class and its logic backend (e.g., TabKeyword and TabKeywordLogic).

get_polling_status

Callback used to determine whether polling mode is enabled (controls button visibility).

Type:

Callable[[], bool]

get_always_show_setting

Callback used to determine whether buttons should always be shown regardless of polling state.

Type:

Callable[[], bool]

version_box

Dropdown for selecting a Bible version.

Type:

QComboBox

keyword_input

Text input for search keywords.

Type:

QLineEdit

radio_and

Search mode radio for “all words” style search.

Type:

QRadioButton

radio_compact

Search mode radio for “exact phrase” search.

Type:

QRadioButton

radio_group

Radio button group for mutually exclusive modes.

Type:

QButtonGroup

search_button

Button triggering a keyword search.

Type:

QPushButton

select_button

Button exporting the selected verse.

Type:

QPushButton

clear_button

Button clearing overlay output.

Type:

QPushButton

table

Result table view for search hits.

Type:

QTableView

summary_title_label

Label for the summary section.

Type:

QLabel

summary_box

Read-only summary output widget.

Type:

QTextEdit

init_ui(version_list, get_polling_status, get_always_show_setting)[source]

Initialize the UI layout and bind widget events.

Parameters:
  • version_list (List[str]) – List of available Bible version strings.

  • get_polling_status (Callable[[], bool]) – Callback for checking polling toggle state.

  • get_always_show_setting (Callable[[], bool]) – Callback for checking the “always show buttons” setting.

update_button_visibility()[source]

Update visibility of the Output and Clear buttons.

Button visibility is determined by the effective polling state, defined as: polling enabled OR the “always show buttons” setting enabled.

on_double_click_save(index)[source]

Handle a double-click event on the result table.

If a valid column is clicked, this delegates saving/exporting logic to the logic backend through the owning tab instance.

Parameters:

index (QModelIndex) – Clicked table index.