chatgui: per-event sound settings with DB persistence

- Sound files loaded from filesystem (sound_dir in INI config, absolute or relative)
- Per-event enable/disable + volume stored in DB (ui_state table)
- SoundManager: setEvent(), effective volume = master * per-event
- SoundSettingsPage UI: 4 event rows (checkbox + slider)
- chat_core_save_ui_state() for async DB writes via uasync thread
- DbManager::getUiStateInt() for reading settings from GUI thread
- Default sounds copied to sounds/ dir next to DB, config entries written
This commit is contained in:
Evgeny committed 2026-07-19 15:17:52 +03:00
1 parent 1593079da8
commit 98bfb9dcd2
12 files changed
+267 -114

No files matched your search

+8
View File
@@ -363,6 +363,14 @@ QString DbManager::getUiState(const QString& key) const {
return val;
}
int DbManager::getUiStateInt(const QString& key, int defaultVal) const {
QString val = getUiState(key);
if (val.isEmpty()) return defaultVal;
bool ok = false;
int v = val.toInt(&ok);
return ok ? v : defaultVal;
}
/* ── sync operations (read-only, for gui_bridge) ── */
QByteArray DbManager::syncListChannels() const {