BibleTime
cconfigurationdialog.cpp
Go to the documentation of this file.
1/*********
2*
3* In the name of the Father, and of the Son, and of the Holy Spirit.
4*
5* This file is part of BibleTime's source code, https://bibletime.info/
6*
7* Copyright 1999-2025 by the BibleTime developers.
8* The BibleTime source code is licensed under the GNU General Public License
9* version 2.0.
10*
11**********/
12
14
15#include <QByteArray>
16#include "../../backend/config/btconfig.h"
17#include "btfontsettings.h"
20#include "cdisplaysettings.h"
21#include "cswordsettings.h"
22
23
24namespace {
25auto const GeometryKey = QStringLiteral("GUI/SettingsDialog/geometry");
26} // anonymous namespace
27
29 Qt::WindowFlags const f)
30 : BtConfigDialog(parent, f)
31{
32 setWindowTitle(tr("Configure BibleTime"));
33 setAttribute(Qt::WA_DeleteOnClose);
34
36 addPage(new CSwordSettingsPage(this));
37 addPage(new BtFontSettingsPage(this));
39 #ifdef BUILD_TEXT_TO_SPEECH
40 addPage(new BtTextToSpeechSettingsPage(this));
41 #endif
42
43 restoreGeometry(btConfig().value<QByteArray>(GeometryKey, QByteArray()));
44}
45
47{ btConfig().setValue(GeometryKey, saveGeometry()); }
BtConfig & btConfig()
This is a shortchand for BtConfig::getInstance().
Definition btconfig.h:305
void setValue(QString const &key, T const &value)
Sets a value for a key.
void addPage(Page *const pageWidget)
Adds the page to this dialog, taking ownership.
The shortcut settings page.
CConfigurationDialog(QWidget *const parent=nullptr, Qt::WindowFlags const f=Qt::WindowFlags())
~CConfigurationDialog() noexcept override