mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-09 21:45:34 +08:00
Ref T422, context/provider functions for COM, XPDR values
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include "blackcore/context/contextownaircraft.h"
|
||||
#include "blackcore/corefacadeconfig.h"
|
||||
#include "blackcore/vatsim/vatsimsettings.h"
|
||||
#include "blackcore/actionbind.h"
|
||||
#include "blackmisc/network/settings/serversettings.h"
|
||||
#include "blackmisc/network/user.h"
|
||||
#include "blackmisc/simulation/aircraftmodel.h"
|
||||
@@ -30,6 +31,7 @@
|
||||
#include "blackmisc/geo/coordinategeodetic.h"
|
||||
#include "blackmisc/pq/frequency.h"
|
||||
#include "blackmisc/pq/length.h"
|
||||
#include "blackmisc/icons.h"
|
||||
#include "blackmisc/settingscache.h"
|
||||
#include "blackmisc/identifiable.h"
|
||||
#include "blackmisc/identifier.h"
|
||||
@@ -114,6 +116,14 @@ namespace BlackCore
|
||||
//! \ingroup ownaircraftprovider
|
||||
virtual BlackMisc::Simulation::CSimulatedAircraft getOwnAircraft() const override;
|
||||
|
||||
//! \copydoc IContextOwnAircraft::getOwnComSystem
|
||||
//! \ingroup ownaircraftprovider
|
||||
virtual BlackMisc::Aviation::CComSystem getOwnComSystem(BlackMisc::Aviation::CComSystem::ComUnit unit) const override;
|
||||
|
||||
//! \copydoc IContextOwnAircraft::getOwnTransponder()
|
||||
//! \ingroup ownaircraftprovider
|
||||
virtual BlackMisc::Aviation::CTransponder getOwnTransponder() const override;
|
||||
|
||||
//! \copydoc IContextOwnAircraft::getOwnAircraftSituation()
|
||||
//! \ingroup ownaircraftprovider
|
||||
virtual BlackMisc::Aviation::CAircraftSituation getOwnAircraftSituation() const override;
|
||||
@@ -132,6 +142,9 @@ namespace BlackCore
|
||||
//! \copydoc IContextOwnAircraft::updateCockpit
|
||||
virtual bool updateCockpit(const BlackMisc::Aviation::CComSystem &com1, const BlackMisc::Aviation::CComSystem &com2, const BlackMisc::Aviation::CTransponder &transponder, const BlackMisc::CIdentifier &originator) override;
|
||||
|
||||
//! \copydoc IContextOwnAircraft::updateTransponderMode
|
||||
virtual bool updateTransponderMode(const BlackMisc::Aviation::CTransponder::TransponderMode &transponderMode, const BlackMisc::CIdentifier &originator) override;
|
||||
|
||||
//! \copydoc IContextOwnAircraft::updateSelcal
|
||||
virtual bool updateSelcal(const BlackMisc::Aviation::CSelcal &selcal, const BlackMisc::CIdentifier &originator) override;
|
||||
|
||||
@@ -194,6 +207,9 @@ namespace BlackCore
|
||||
QString m_voiceRoom2UrlOverride; //!< overridden voice room url
|
||||
mutable QReadWriteLock m_lockAircraft; //!< lock aircraft
|
||||
|
||||
CActionBind m_actionToggleXpdr { "/Own aircraft/Toggle XPDR state", BlackMisc::CIcons::radio16(), this, &CContextOwnAircraft::actionToggleTransponder };
|
||||
CActionBind m_actionIdent { "/Own aircraft/XPDR ident", BlackMisc::CIcons::radio16(), this, &CContextOwnAircraft::actionIdent };
|
||||
|
||||
static constexpr qint64 MinHistoryDeltaMs = 1000;
|
||||
static constexpr int MaxHistoryElements = 20;
|
||||
QTimer m_historyTimer; //!< history timer
|
||||
@@ -214,6 +230,11 @@ namespace BlackCore
|
||||
//! \ingroup crosscontextfunction
|
||||
void xCtxChangedSimulatorStatus(int status);
|
||||
|
||||
//! Actions @{
|
||||
void actionToggleTransponder(bool keydown);
|
||||
void actionIdent(bool keydown);
|
||||
//! @}
|
||||
|
||||
//! Web data loaded
|
||||
void allSwiftWebDataRead();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user