mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 16:56:53 +08:00
Ref T739, make member of CAfvClient a "pointer"
* we can use forward declaration for m_voiceClient * make IContextAudio -> BlackMisc::CIdentifiable * removed delayedInitMicrophone, RR will move it to another place
This commit is contained in:
committed by
Mat Sutcliffe
parent
3bf4eda702
commit
ff33b59683
@@ -13,8 +13,8 @@
|
||||
|
||||
#include "afvmapdialog.h"
|
||||
#include "ui_afvmapdialog.h"
|
||||
//#include <QQmlContext>
|
||||
//#include <QQmlEngine>
|
||||
// #include <QQmlContext>
|
||||
// #include <QQmlEngine>
|
||||
|
||||
using namespace BlackCore::Afv::Model;
|
||||
using namespace BlackCore::Afv::Clients;
|
||||
@@ -27,28 +27,31 @@ namespace BlackGui
|
||||
QDialog(parent),
|
||||
ui(new Ui::CAfvMapDialog)
|
||||
{
|
||||
/**
|
||||
m_afvMapReader = new CAfvMapReader(this);
|
||||
m_afvMapReader->updateFromMap();
|
||||
|
||||
// if (sGui && !sGui->isShuttingDown() && sGui->getIContextAudio())
|
||||
// {
|
||||
// if (sGui->getIContextAudio()->isUsingImplementingObject())
|
||||
// {
|
||||
// m_afvClient = &sGui->getCoreFacade()->getCContextAudio()->voiceClient();
|
||||
// }
|
||||
// }
|
||||
CAfvClient *afvClient = nullptr;
|
||||
if (sGui && !sGui->isShuttingDown() && sGui->getIContextAudio())
|
||||
{
|
||||
if (sGui->getIContextAudio()->isUsingImplementingObject())
|
||||
{
|
||||
afvClient = sGui->getCoreFacade()->getCContextAudio()->voiceClient();
|
||||
}
|
||||
}
|
||||
|
||||
ui->setupUi(this);
|
||||
// QQmlContext *ctxt = ui->qw_AfvMap->rootContext();
|
||||
// ctxt->setContextProperty("afvMapReader", m_afvMapReader);
|
||||
QQmlContext *ctxt = ui->qw_AfvMap->rootContext();
|
||||
ctxt->setContextProperty("afvMapReader", m_afvMapReader);
|
||||
|
||||
// if (m_afvClient)
|
||||
// {
|
||||
// ctxt->setContextProperty("voiceClient", m_afvClient);
|
||||
// }
|
||||
if (m_afvClient)
|
||||
{
|
||||
ctxt->setContextProperty("voiceClient", afvClient);
|
||||
}
|
||||
|
||||
// // ui->qw_AfvMap->engine()->setBaseUrl(":/blackgui/qml");
|
||||
// ui->qw_AfvMap->setSource(QUrl("qrc:/blackgui/qml/AFVMap.qml"));
|
||||
// ui->qw_AfvMap->engine()->setBaseUrl(":/blackgui/qml");
|
||||
ui->qw_AfvMap->setSource(QUrl("qrc:/blackgui/qml/AFVMap.qml"));
|
||||
**/
|
||||
}
|
||||
|
||||
CAfvMapDialog::~CAfvMapDialog() { }
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace BlackGui
|
||||
private:
|
||||
QScopedPointer<Ui::CAfvMapDialog> ui;
|
||||
BlackCore::Afv::Model::CAfvMapReader *m_afvMapReader = nullptr;
|
||||
BlackCore::Afv::Clients::CAfvClient *m_afvClient = nullptr;
|
||||
BlackCore::Afv::Clients::CAfvClient *m_afvClient = nullptr;
|
||||
};
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
Reference in New Issue
Block a user