4 #include <QGuiApplication>
6 #include <QQmlApplicationEngine>
15 #include "core/afv/model/afvmapreader.h"
16 #include "core/afv/model/atcstationmodel.h"
22 using namespace swift::config;
24 using namespace swift::misc::network;
26 using namespace swift::core::afv::clients;
27 using namespace swift::core::afv::model;
29 int main(
int argc,
char *argv[])
31 QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
32 QGuiApplication qa(argc, argv);
41 voiceClient->
start(QThread::TimeCriticalPriority);
44 QObject::connect(&qa, &QCoreApplication::aboutToQuit, [voiceClient]() { voiceClient->
quitAndWait(); });
47 QString defaultUserName(
"1234567");
50 const CUser user(
"OBF:AwLZ7f9hUmpSZhm4=",
"Joe Doe");
51 defaultUserName = user.getId();
54 QQmlApplicationEngine engine;
55 QQmlContext *ctxt = engine.rootContext();
56 ctxt->setContextProperty(
"afvMapReader", afvMapReader);
57 ctxt->setContextProperty(
"voiceClient", voiceClientBridge);
58 ctxt->setContextProperty(
"userName", defaultUserName);
60 engine.load(QUrl(QStringLiteral(
"qrc:/main.qml")));
Bridge, running in main thread -> voice client in own thread.
static bool isLocalDeveloperDebugBuild()
Local build for developers.
void updateFromMap()
Update ATC stations in model.
void quitAndWait() noexcept final
Calls quit() and blocks until the thread is finished.
void start(QThread::Priority priority=QThread::InheritPriority)
Starts a thread and moves the worker into it.
Value object encapsulating information of a user.
Backend services of the swift project, like dealing with the network or the simulators.
void registerMetadata()
Register all relevant metadata in swift::core.
Free functions in swift::misc.
int main(int argc, char *argv[])
main