Ref T731, moved AFV station model and client to BlackCore::Afv

* the QML map can also be used in dialog
* ATC station list also can be used in BlackCore
This commit is contained in:
Klaus Basan
2019-09-21 23:33:15 +02:00
committed by Mat Sutcliffe
parent 66b02e61c5
commit 992d624c18
16 changed files with 413 additions and 350 deletions

View File

@@ -8,8 +8,15 @@
//! \file
#include "blackcore/afv/clients/afvclient.h"
#include "blackcore/afv/model/afvmapreader.h"
#include "afvmapdialog.h"
#include "ui_afvmapdialog.h"
#include <QQmlContext>
using namespace BlackCore::Afv::Model;
using namespace BlackCore::Afv::Clients;
namespace BlackGui
{
@@ -20,6 +27,13 @@ namespace BlackGui
ui(new Ui::CAfvMapDialog)
{
ui->setupUi(this);
m_afvMapReader = new CAfvMapReader(this);
m_afvMapReader->updateFromMap();
m_afvClient = new CAfvClient("https://voice1.vatsim.uk");
QQmlContext *ctxt = ui->qw_AfvMap->rootContext();
ctxt->setContextProperty("afvMapReader", m_afvMapReader);
ctxt->setContextProperty("voiceClient", m_afvClient);
}
CAfvMapDialog::~CAfvMapDialog() { }

View File

@@ -15,6 +15,14 @@
#include <QDialog>
#include <QScopedPointer>
namespace BlackCore
{
namespace Afv
{
namespace Model { class CAfvMapReader; }
namespace Clients { class CAfvClient; }
}
}
namespace Ui { class CAfvMapDialog; }
namespace BlackGui
{
@@ -34,6 +42,8 @@ namespace BlackGui
private:
QScopedPointer<Ui::CAfvMapDialog> ui;
BlackCore::Afv::Model::CAfvMapReader *m_afvMapReader = nullptr;
BlackCore::Afv::Clients::CAfvClient *m_afvClient = nullptr;
};
} // ns
} // ns