core.generator.ui.slide_generator_right_contents

File:

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

Dynamic right-hand content panel for the slide generator UI.

This module defines core.generator.ui.slide_generator_right_contents.SlideGeneratorRightContents, a QWidget responsible for hosting the style-specific input panes used to edit slide content. The widget acts as a dispatcher that selects and embeds the appropriate sub-pane based on the slide style (e.g., “lyrics”, “verse”, “anthem”).

Each sub-pane encapsulates its own UI logic and data extraction method, allowing the generator to remain modular and extensible as new slide styles are added.

class core.generator.ui.slide_generator_right_contents.SlideGeneratorRightContents(*args, **kwargs)[source]

Bases: QWidget

Right-hand dynamic content panel for editing slide data.

This widget selects and embeds a style-specific editor pane based on the given slide style. Each supported style maps to a dedicated sub-widget (e.g., LyricsContent, VerseContent) that defines its own input fields and data extraction logic.

Supported slide styles:

  • "anthem": Choir name and anthem title editor

  • "corner" / "intro": Corner-style caption and headline

  • "greet": Greeting or announcement text

  • "hymn": Hymn editor (exported as lyrics-style slides)

  • "lyrics": General lyrics editor with deferred line splitting

  • "prayer": Prayer title and leader name

  • "respo": Responsive reading editor

  • "verse": Bible verse reference and preview editor

  • "image": Image-based slide editor (path stored in headline)

  • "video": Video-based slide editor (path stored in headline)

  • "blank": Empty slide with no editable content

Parameters:
  • style (str)

  • caption (str)

  • headline (str)

style

Internal slide style key that determines which sub-pane is created.

Type:

str

generator_window

Reference to the parent generator window, passed through to sub-panes so they can access shared context, settings, or callbacks.

Type:

QWidget

subpane

The instantiated style-specific content widget responsible for rendering input fields and producing slide data. For "blank" or unsupported styles, this is an empty QWidget.

Type:

QWidget

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

Initialize the right-hand content panel for a specific slide style.

This constructor selects the appropriate style-specific sub-pane and embeds it into the panel layout. Initial caption and headline values are passed through to the sub-pane to pre-fill the editor when editing an existing slide.

Parameters:
  • style (str) – Internal slide style key (e.g., “lyrics”, “verse”, “anthem”).

  • generator_window – Reference to the main slide generator window. This is passed to sub-panes so they can access shared state or utilities.

  • caption (str) – Initial caption value for the slide.

  • headline (str) – Initial headline or main content value for the slide.

  • parent (QWidget | None) – Optional parent widget.

Returns:

None

get_slide_data()[source]

Retrieve the slide data from the active content sub-pane.

This method delegates to the embedded sub-pane’s get_slide_data() method if it exists. If the current sub-pane does not implement data extraction (e.g., “blank” slides), an empty dictionary is returned.

Parameters:

None

Returns:

Dictionary representing the current slide’s content, suitable for inclusion in the generator’s internal slide session data.

Return type:

dict