core.generator.ui.contents.greet_content

File:

EuljiroWorship/core/generator/ui/contents/greet_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 “greet” style slides.

This module defines core.generator.ui.contents.greet_content.GreetContent, a QWidget that provides input fields for greeting or message-style slides. These slides are typically used for welcome messages, sermon titles with extended descriptions, or other freeform announcements.

The widget supports a short caption and a multiline headline, and integrates with core.generator.utils.slide_input_submitter.SlideInputSubmitter to enable automatic submission and synchronization with the parent generator window.

class core.generator.ui.contents.greet_content.GreetContent(*args, **kwargs)[source]

Bases: QWidget

Content editor widget for “greet”-style slides.

This widget is used to compose greeting or announcement slides, typically shown at the beginning or end of a service. It allows the user to enter:

  • A short caption (e.g., Bible reference or section label)

  • A multi-line headline containing the main greeting or message

The entered content is converted into a slide data dictionary containing style, caption, and headline fields, which are then consumed by the slide generator and controller.

Parameters:
  • caption (str)

  • headline (str)

caption

Initial caption text provided when the widget is created. Usually a short reference or subtitle.

Type:

str

headline

Initial headline text provided when the widget is created. Usually a greeting or main message body.

Type:

str

generator_window

Reference to the slide generator window. Used to submit updated slide data and support automatic save/synchronization behavior.

caption_edit

Single-line input field for editing the caption text.

Type:

QLineEdit

headline_edit

Multi-line text input field for editing the main greeting message.

Type:

QPlainTextEdit

submitter

Helper object that monitors input widgets and submits updated slide data to the generator window whenever changes occur.

Type:

SlideInputSubmitter

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

Initialize the greet slide content editor.

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

  • generator_window – Reference to the generator window, used for submitting slide data and enabling auto-save behavior.

  • caption (str) – Initial caption value (e.g., reference or short label).

  • headline (str) – Initial headline value (e.g., greeting or main message).

Returns:

None

build_ui()[source]

Construct the UI elements for editing a “greet”-style slide.

This method creates labeled input fields for caption and multiline headline content, arranges them vertically, and registers the inputs with core.generator.utils.slide_input_submitter.SlideInputSubmitter to enable automatic submission.

Parameters:

None

Returns:

None

build_greet_slide()[source]

Conditionally generate greet slide data.

If both caption and headline 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 greet slide.

Parameters:

None

Returns:

Dictionary representing the greet slide, including:

  • style

  • caption

  • headline

Return type:

dict