-
Notifications
You must be signed in to change notification settings - Fork 2
/
Application.h
66 lines (46 loc) · 1.46 KB
/
Application.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef APPLICATION_H
#define APPLICATION_H
#include "interfaces/Quantor.h"
#include "ApplicationContext.h"
#include "Constants.h"
#include "logging/ConsoleLogger.h"
#include "logging/LogManager.h"
#include <QApplication>
#include <QSettings>
#include <memory>
namespace q2d {
class Application
: public QApplication {
Q_OBJECT
private:
QSettings* m_appSettings;
ApplicationContext* m_context;
quantor::QuantorInterface m_quantorInterface;
logging::LogManager* m_logManager;
logging::ConsoleLogger* m_consoleLogger;
void defaultSetting(QString name, QVariant defaultValue);
void checkSettings();
void setupLogging();
/**
* @brief m_logger the logger used by everything related to the application itself.
*/
logging::Logger* m_logger;
public:
explicit Application(int &argc, char** argv[]);
virtual ~Application();
ApplicationContext* getContext();
QVariant getSetting(QString key);
logging::ConsoleLogger* consoleLogger() const;
logging::LogManager* logManager() const;
static Application* instance();
signals:
// --- forwarded signals ---
// ApplicationContext -> Quantor
void signal_quantorTriggered(Document* document, QStringList targetFunctions);
// Quantor -> ApplicationContext -> MainWindow
void signal_quantorSolutionAvailable(QString, const QMap<QString, bool>*);
public slots:
void slot_resetSettings();
};
} // namespace q2d
#endif // APPLICATION_H