core.generator.ui.contents.corner_content

File:

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

This module defines core.generator.ui.contents.corner_content.CornerContent, a QWidget that provides simple text inputs for creating “corner”-style slides. A “corner” slide typically displays a short headline and a caption in a fixed corner position on the screen, and is commonly used for sermon titles, worship order sections, or brief section headers.

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

class core.generator.ui.contents.corner_content.CornerContent(*args, **kwargs)[source]

Bases: QWidget

Content editor widget for “corner” style slides.

This widget provides a simple editor for corner-style slides, typically used for sermon titles, section headers, or brief announcements. It allows the user to edit:

  • Headline text (main title)

  • Caption text (subtitle or secondary label)

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

Parameters:
  • caption (str)

  • headline (str)

caption

Initial caption text provided when the widget is created. Typically represents a subtitle or secondary label.

Type:

str

headline

Initial headline text provided when the widget is created. Typically represents the main title.

Type:

str

generator_window

Reference to the slide generator window. Used for automatic submission, synchronization, and save/update behavior.

headline_edit

Input field for editing the headline text.

Type:

QLineEdit

caption_edit

Input field for editing the caption text.

Type:

QLineEdit

submitter

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

Type:

SlideInputSubmitter

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

Initialize the corner 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 text (e.g., subtitle or section label).

  • headline (str) – Initial headline text (e.g., main title).

Returns:

None

build_ui()[source]

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

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

Parameters:

None

Returns:

None

build_corner_slide()[source]

Conditionally generate corner slide data.

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

Parameters:

None

Returns:

Dictionary representing the corner slide, including:

  • style

  • caption

  • headline

Return type:

dict