mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-09 21:45:34 +08:00
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:
committed by
Mat Sutcliffe
parent
66b02e61c5
commit
992d624c18
@@ -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() { }
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user