mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-08 03:35:35 +08:00
refs #268 populated CSimulatorXPlane with the implementation code to connect to XBus and get the aircraft situation and model via CXBusServiceProxy
This commit is contained in:
@@ -9,12 +9,17 @@
|
||||
//! \file
|
||||
|
||||
#include "blackcore/simulator.h"
|
||||
#include <QDBusConnection>
|
||||
|
||||
class QDBusServiceWatcher;
|
||||
|
||||
namespace BlackSimPlugin
|
||||
{
|
||||
namespace XPlane
|
||||
{
|
||||
|
||||
class CXBusServiceProxy;
|
||||
|
||||
/*!
|
||||
* X-Plane ISimulator implementation
|
||||
*/
|
||||
@@ -32,6 +37,15 @@ namespace BlackSimPlugin
|
||||
//! \copydoc BlackCore::ISimulator::canConnect
|
||||
virtual bool canConnect() override;
|
||||
|
||||
private:
|
||||
QDBusConnection m_conn { "default" };
|
||||
QDBusServiceWatcher *m_watcher { nullptr };
|
||||
CXBusServiceProxy *m_service { nullptr };
|
||||
|
||||
private slots:
|
||||
void serviceRegistered();
|
||||
void serviceUnregistered();
|
||||
|
||||
public slots:
|
||||
//! \copydoc BlackCore::ISimulator::connectTo
|
||||
virtual bool connectTo() override;
|
||||
|
||||
Reference in New Issue
Block a user