BibleTime
src
frontend
settingsdialogs
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
13
#include "
cconfigurationdialog.h
"
14
15
#include <QByteArray>
16
#include "../../backend/config/btconfig.h"
17
#include "
btfontsettings.h
"
18
#include "
bttexttospeechsettings.h
"
19
#include "
cacceleratorsettings.h
"
20
#include "
cdisplaysettings.h
"
21
#include "
cswordsettings.h
"
22
23
24
namespace
{
25
auto
const
GeometryKey
= QStringLiteral(
"GUI/SettingsDialog/geometry"
);
26
}
// anonymous namespace
27
28
CConfigurationDialog::CConfigurationDialog
(
QWidget
*
const
parent,
29
Qt::WindowFlags
const
f)
30
:
BtConfigDialog
(parent, f)
31
{
32
setWindowTitle(tr(
"Configure BibleTime"
));
33
setAttribute(Qt::WA_DeleteOnClose);
34
35
addPage
(
new
CDisplaySettingsPage
(
this
));
36
addPage
(
new
CSwordSettingsPage
(
this
));
37
addPage
(
new
BtFontSettingsPage
(
this
));
38
addPage
(
new
CAcceleratorSettingsPage
(
this
));
39
#ifdef BUILD_TEXT_TO_SPEECH
40
addPage
(
new
BtTextToSpeechSettingsPage(
this
));
41
#endif
42
43
restoreGeometry(
btConfig
().value<QByteArray>(GeometryKey, QByteArray()));
44
}
45
46
CConfigurationDialog::~CConfigurationDialog
() noexcept
47
{
btConfig
().
setValue
(GeometryKey, saveGeometry()); }
btConfig
BtConfig & btConfig()
This is a shortchand for BtConfig::getInstance().
Definition
btconfig.h:305
btfontsettings.h
bttexttospeechsettings.h
cacceleratorsettings.h
cconfigurationdialog.h
cdisplaysettings.h
BtConfigCore::setValue
void setValue(QString const &key, T const &value)
Sets a value for a key.
Definition
btconfigcore.h:73
BtConfigDialog
Definition
btconfigdialog.h:36
BtConfigDialog::addPage
void addPage(Page *const pageWidget)
Adds the page to this dialog, taking ownership.
Definition
btconfigdialog.cpp:116
BtFontSettingsPage
Definition
btfontsettings.h:31
CAcceleratorSettingsPage
The shortcut settings page.
Definition
cacceleratorsettings.h:32
CConfigurationDialog::CConfigurationDialog
CConfigurationDialog(QWidget *const parent=nullptr, Qt::WindowFlags const f=Qt::WindowFlags())
Definition
cconfigurationdialog.cpp:28
CConfigurationDialog::~CConfigurationDialog
~CConfigurationDialog() noexcept override
Definition
cconfigurationdialog.cpp:46
CDisplaySettingsPage
Definition
cdisplaysettings.h:27
CSwordSettingsPage
Definition
cswordsettings.h:26
QWidget
cswordsettings.h
anonymous_namespace{cconfigurationdialog.cpp}::GeometryKey
auto const GeometryKey
Definition
cconfigurationdialog.cpp:25
Generated by
1.9.8