core.generator.ui.contents.lyrics_content
- File:
EuljiroWorship/core/generator/ui/contents/lyrics_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 “lyrics” style slides.
This module defines core.generator.ui.contents.lyrics_content.LyricsContent, a QWidget that provides input fields
for entering a song or praise title and its lyrics. The lyrics are entered
as multiline text and are later split into multiple slides according to
the generator’s export rules (typically every two lines).
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.lyrics_content.LyricsContent(*args, **kwargs)[source]
Bases:
QWidgetContent editor widget for “lyrics” style slides.
This widget collects:
Song/praise title (stored in
caption)Multiline lyrics body (stored in
headlineas raw text)
The widget intentionally stores lyrics as raw, unsplit text. The slide export pipeline is responsible for splitting the lyrics into multiple slides (e.g., two lines per slide, special split markers like “(간주)”, etc.), so the editor remains focused on input and synchronization.
This widget integrates with the generator window via
core.generator.utils.slide_input_submitter.SlideInputSubmitterso that edits can be submitted automatically.- Parameters:
caption (str)
headline (str)
- caption
Initial title value passed at construction time.
- Type:
str
- headline
Initial lyrics body passed at construction time (raw multiline text).
- Type:
str
- generator_window
Reference to the generator window that receives slide updates and manages auto-save/session behavior.
- caption_label
Label describing the title input.
- Type:
QLabel
- caption_edit
Input field for the lyrics title (slide
caption).- Type:
QLineEdit
- headline_label
Label describing the lyrics body input.
- Type:
QLabel
- headline_edit
Multiline editor for raw lyrics text (slide
headline).- Type:
QPlainTextEdit
- submitter
Auto-submit helper that observes inputs and provides updated slide payloads via
build_lyrics_slide().- Type:
- __init__(parent, generator_window, caption='', headline='')[source]
Initialize the “lyrics”-style content editor.
- Parameters:
parent (QWidget) – Parent widget container.
generator_window – Reference to the generator main window, used for submitting slide data and enabling auto-save behavior.
caption (str) – Initial title text for the lyrics slide.
headline (str) – Initial lyrics content.
- Returns:
None
- build_ui()[source]
Construct the UI elements for editing a “lyrics”-style slide.
This method creates labeled input fields for the lyrics title and multiline lyrics content, arranges them vertically, and registers the title input with
core.generator.utils.slide_input_submitter.SlideInputSubmitterto enable automatic submission.- Parameters:
None
- Returns:
None
- build_lyrics_slide()[source]
Conditionally generate “lyrics”-style slide data.
If both the title and lyrics 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