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-2021 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 "
cacceleratorsettings.h
"
19
#include "
cdisplaysettings.h
"
20
#include "
cswordsettings.h
"
21
22
23
namespace
{
24
auto
const
GeometryKey
= QStringLiteral(
"GUI/SettingsDialog/geometry"
);
25
}
// anonymous namespace
26
27
CConfigurationDialog::CConfigurationDialog
(
QWidget
*
const
parent,
28
Qt::WindowFlags
const
f)
29
:
BtConfigDialog
(parent, f)
30
{
31
setWindowTitle(tr(
"Configure BibleTime"
));
32
setAttribute(Qt::WA_DeleteOnClose);
33
34
addPage
(
new
CDisplaySettingsPage
(
this
));
35
addPage
(
new
CSwordSettingsPage
(
this
));
36
addPage
(
new
BtFontSettingsPage
(
this
));
37
addPage
(
new
CAcceleratorSettingsPage
(
this
));
38
39
restoreGeometry(
btConfig
().value<QByteArray>(
GeometryKey
, QByteArray()));
40
}
41
42
CConfigurationDialog::~CConfigurationDialog
() noexcept
43
{
btConfig
().
setValue
(
GeometryKey
, saveGeometry()); }
btConfig
BtConfig & btConfig()
This is a shortchand for BtConfig::getInstance().
Definition:
btconfig.h:305
btfontsettings.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:27
CConfigurationDialog::~CConfigurationDialog
~CConfigurationDialog() noexcept override
Definition:
cconfigurationdialog.cpp:42
CDisplaySettingsPage
Definition:
cdisplaysettings.h:27
CSwordSettingsPage
Definition:
cswordsettings.h:26
QWidget
cswordsettings.h
anonymous_namespace{cconfigurationdialog.cpp}::GeometryKey
auto const GeometryKey
Definition:
cconfigurationdialog.cpp:24
Generated by
1.9.1