gui.utils.state_saver

File:

EuljiroBible/gui/utils/state_saver.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.

Provides utility functions to save application settings from the UI state in EuljiroBible.

gui.utils.state_saver.save_settings_from_ui(app, tab_verse)[source]

Persist relevant UI state into the application settings.

This function extracts user-facing state from the running UI and writes it to the settings store via ConfigManager. It is typically called on application shutdown to ensure that the next launch restores the most recent context.

The following information is captured:

  • Application-wide font family, size, and weight

  • Last selected Bible versions

  • Last selected book, chapter, and verse

  • Current dark mode state

Parameters:
  • app (QApplication) – Active QApplication instance used to query global font and theme (dark mode) state.

  • tab_verse (TabVerse) – Verse tab instance providing access to the current book/chapter/verse selection and version helper.

Returns:

None