core.generator.ui.slide_generator_dialog
- File:
EuljiroWorship/core/generator/ui/slide_generator_dialog.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.
Modal dialog for editing a single slide.
This module defines core.generator.ui.slide_generator_dialog.SlideGeneratorDialog, a QDialog wrapper that reuses the
existing right-hand content panel (core.generator.ui.slide_generator_right_contents.SlideGeneratorRightContents) inside a
modal dialog context. It allows slide editing via the same style-specific UI
used in the main generator, but with explicit OK/Cancel semantics.
The dialog itself contains no slide-specific logic; it delegates all content handling to the embedded right-panel widget and simply returns the edited result when accepted.
- class core.generator.ui.slide_generator_dialog.SlideGeneratorDialog(*args, **kwargs)[source]
Bases:
QDialogModal dialog for editing a single slide.
This dialog embeds
core.generator.ui.slide_generator_right_contents.SlideGeneratorRightContentsto provide the same style-specific editing UI used in the generator, but presents it in a blocking modal dialog with explicit OK/Cancel buttons.- Parameters:
style (str)
caption (str)
headline (str)
- content_widget
The embedded style-specific editor widget that owns the input fields and produces the final slide data dict.
- button_box
Standard OK/Cancel button box wired to
accept()andreject().- Type:
QDialogButtonBox
- __init__(style, caption, headline, parent=None)[source]
Initialize the slide editor dialog.
This constructor creates a modal dialog window, embeds a
core.generator.ui.slide_generator_right_contents.SlideGeneratorRightContentswidget configured for the given slide style, and adds a standard OK/Cancel button box.- Parameters:
style (str) – Internal slide style key (e.g., “lyrics”, “verse”, “anthem”).
caption (str) – Initial caption value to pre-fill the editor.
headline (str) – Initial headline or main content value to pre-fill the editor.
parent (QWidget | None) – Optional parent widget for modal ownership.
- Returns:
None
- get_result()[source]
Return the edited slide data from the dialog.
This method should only be called after the dialog has been accepted (i.e.,
exec()returned QDialog.Accepted). The returned dictionary is produced by the embedded content widget and represents the fully edited slide data.- Parameters:
None
- Returns:
Dictionary representing the edited slide content.
- Return type:
dict