myproject 0.0.0
%%description%%
Loading...
Searching...
No Matches
application.h
Go to the documentation of this file.
1#pragma once
2
3#include <QGuiApplication>
4#include <QQmlApplicationEngine>
5
6#include "base.h"
7#include "settings.h"
8
9namespace myproject {
10
13 public:
14 Application(int& argc, char** argv);
15 Application(const Application&) = delete;
19 ~Application() = default;
20
23 [[nodiscard]] int run() const;
24
27 [[nodiscard]] QQmlApplicationEngine* qmlEngine() const;
30 [[nodiscard]] Settings* settings() const;
31
32 private:
34 static void initializeSentry();
36 void registerQmlTypes() const;
38 void addFonts() const;
39
40 QScopedPointer<QGuiApplication> m_Application;
41 QScopedPointer<QQmlApplicationEngine> m_Engine{new QQmlApplicationEngine};
42 QScopedPointer<Settings, QScopedPointerDeleteLater> m_Settings{new Settings};
43};
44
45} // namespace myproject
The Application class used to manage the application.
Definition application.h:12
Application(int &argc, char **argv)
Definition application.cpp:78
Application(Application &&)=delete
QQmlApplicationEngine * qmlEngine() const
Returns the QML engine.
Definition application.cpp:109
Application & operator=(const Application &)=delete
int run() const
Runs the application.
Definition application.cpp:107
Settings * settings() const
Returns the settings.
Definition application.cpp:111
Application & operator=(Application &&)=delete
Application(const Application &)=delete
The Settings class is a singleton that manages the application settings.
Definition settings.h:12
Definition application.cpp:63