mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
* added namespace * removed some *.pri files and added files to blackcore.pro * added copyright etc.
36 lines
976 B
C++
36 lines
976 B
C++
// #include "voiceclientui.h"
|
|
|
|
#include "models/atcstationmodel.h"
|
|
#include "clients/afvclient.h"
|
|
#include "afvmapreader.h"
|
|
#include "blackcore/application.h"
|
|
|
|
#include <QGuiApplication>
|
|
#include <QQmlApplicationEngine>
|
|
#include <QQmlContext>
|
|
#include <QPointer>
|
|
#include <QThread>
|
|
|
|
using namespace BlackCore::Afv::Clients;
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
|
QGuiApplication qa(argc, argv);
|
|
|
|
BlackCore::CApplication a("sampleafvclient", BlackMisc::CApplicationInfo::Sample);
|
|
|
|
AFVMapReader *afvMapReader = new AFVMapReader(&a);
|
|
afvMapReader->updateFromMap();
|
|
|
|
AFVClient voiceClient("https://voice1.vatsim.uk");
|
|
|
|
QQmlApplicationEngine engine;
|
|
QQmlContext *ctxt = engine.rootContext();
|
|
ctxt->setContextProperty("afvMapReader", afvMapReader);
|
|
ctxt->setContextProperty("voiceClient", &voiceClient);
|
|
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
|
|
|
|
return a.exec();
|
|
}
|