core.generator.ui.contents.prayer_content

File:

EuljiroWorship/core/generator/ui/contents/prayer_content.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.

UI content widget for editing “prayer”-style slides.

This module defines core.generator.ui.contents.prayer_content.PrayerContent, a QWidget that provides input fields for creating prayer slides. A prayer slide typically consists of a short title (e.g., “기도”) and the name of the person leading the prayer.

The widget integrates with core.generator.utils.slide_input_submitter.SlideInputSubmitter to support automatic submission and synchronization with the parent slide generator.

class core.generator.ui.contents.prayer_content.PrayerContent(*args, **kwargs)[source]

Bases: QWidget

Content editor widget for “prayer”-style slides.

This widget collects minimal structured information required for a prayer slide:

  • A short prayer title (e.g., “기도”)

  • The name of the prayer leader (e.g., “이승철 장로”)

The widget focuses purely on data entry and synchronization. It does not perform any rendering logic itself; instead, it produces a simple slide dictionary consumed later by the slide generator and controller.

Integration with core.generator.utils.slide_input_submitter.SlideInputSubmitter allows the prayer slide to be automatically regenerated and persisted whenever input fields change.

Parameters:
  • caption (str)

  • headline (str)

caption

Initial prayer title value provided at construction time.

Type:

str

headline

Initial prayer leader name provided at construction time.

Type:

str

generator_window

Reference to the generator main window that receives slide updates and manages auto-save/session state.

caption_label

Label describing the prayer title input field.

Type:

QLabel

caption_edit

Input field for the prayer title (slide caption).

Type:

QLineEdit

headline_label

Label describing the prayer leader input field.

Type:

QLabel

headline_edit

Input field for the prayer leader name (slide headline).

Type:

QLineEdit

submitter

Auto-submit helper that observes input widgets and supplies updated slide data via build_prayer_slide().

Type:

SlideInputSubmitter

__init__(parent, generator_window, caption='기도', headline='')[source]

Initialize the prayer content editor.

Parameters:
  • parent (QWidget) – Parent widget container.

  • generator_window – Reference to the generator main window, used for slide submission and auto-save behavior.

  • caption (str) – Initial prayer title. Defaults to “기도”.

  • headline (str) – Initial name of the prayer leader.

Returns:

None

build_ui()[source]

Construct the UI elements for editing a prayer slide.

This method creates labeled input fields for the prayer title and the prayer leader’s name, arranges them vertically, and registers the inputs with core.generator.utils.slide_input_submitter.SlideInputSubmitter to enable automatic submission.

Parameters:

None

Returns:

None

build_prayer_slide()[source]

Conditionally generate prayer slide data.

If both the title and leader name fields are empty, no slide data is generated. Otherwise, the current input values are returned as a slide data dictionary.

Parameters:

None

Returns:

Slide data dictionary if at least one field is non-empty; otherwise, None.

Return type:

dict | None

get_slide_data()[source]

Generate the slide data dictionary for a prayer slide.

Parameters:

None

Returns:

Dictionary representing the prayer slide, including:

  • style

  • caption (prayer title)

  • headline (prayer leader name)

Return type:

dict