BibleTime
bibletimeapp.h
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#pragma once
14
15#include <QApplication>
16
17#include "../backend/managers/cswordbackend.h"
18#include <optional>
19#include <QObject>
20#include <QString>
21
22
23class BtIcons;
24
25/**
26 The BibleTimeApp class is used to clean up all instances of the backend and to
27 delete all created module objects.
28*/
29class BibleTimeApp : public QApplication {
30
31 Q_OBJECT
32
33public: // methods:
34
35 BibleTimeApp(int &argc, char **argv);
36 ~BibleTimeApp() override;
37
38 void startInit() { m_init = true; }
39
40 bool initBtConfig();
43 void initIcons();
44 void initBackends();
45
46 bool debugMode() const noexcept { return m_debugMode; }
47 void setDebugMode(bool const debugMode) noexcept
49
50private: // fields:
51
52 bool m_init;
55 std::optional<CSwordBackend> m_backend;
56
57};
58
59#define btApp (static_cast<BibleTimeApp *>(BibleTimeApp::instance()))
void startInit()
bool initDisplayTemplateManager()
std::optional< CSwordBackend > m_backend
bool debugMode() const noexcept
void setDebugMode(bool const debugMode) noexcept
void initLightDarkPalette()
BtIcons * m_icons
~BibleTimeApp() override