6#ifndef SWIFT_CORE_CONTEXT_CONTEXTOWNAIRCRAFT_IMPL_H
7#define SWIFT_CORE_CONTEXT_CONTEXTOWNAIRCRAFT_IMPL_H
12#include <QReadWriteLock>
63 public IContextOwnAircraft,
72 friend class IContextOwnAircraft;
187 void toggleTransponderMode()
override;
225 CActionBind m_actionToggleXpdr { swift::misc::input::toggleXPDRStateHotkeyAction(),
226 swift::misc::input::toggleXPDRStateHotkeyIcon(),
this,
227 &CContextOwnAircraft::actionToggleTransponder };
228 CActionBind m_actionIdent { swift::misc::input::toggleXPDRIdentHotkeyAction(),
229 swift::misc::input::toggleXPDRIdentHotkeyIcon(),
this,
230 &CContextOwnAircraft::actionIdent };
232 static constexpr qint64 MinHistoryDeltaMs = 1000;
233 static constexpr int MaxHistoryElements = 20;
235 std::atomic_bool m_history {
true };
244 void xCtxChangedSimulatorModel(
const swift::misc::simulation::CAircraftModel &model,
245 const swift::misc::CIdentifier &identifier);
249 void xCtxChangedSimulatorStatus(
int status);
253 void actionToggleTransponder(
bool keydown);
254 void actionIdent(
bool keydown);
258 void allSwiftWebDataRead();
261 void initOwnAircraft();
264 void evaluateUpdateHistory();
267 bool updateOwnModel(
const swift::misc::simulation::CAircraftModel &model,
268 const swift::misc::CIdentifier &identifier);
271 static swift::misc::simulation::CAircraftModel
272 reverseLookupModel(
const swift::misc::simulation::CAircraftModel &model);
CActionBind binds a member function to an action.
ContextMode
How to handle a given context.
The class providing facades (the contexts) for all DBus relevant operations.
Own aircraft context implementation. Central instance of data for.
swift::misc::simulation::CAircraftModel getOwnAircraftModel() const
Own aircraft model.
~CContextOwnAircraft()=default
Destructor.
swift::misc::physical_quantities::CLength getDistanceToOwnAircraft(const swift::misc::geo::ICoordinateGeodetic &position) const
Distance to own aircraft.
swift::misc::geo::CCoordinateGeodetic getOwnAircraftPosition() const
Own aircraft's position.
swift::misc::aviation::CCallsign getOwnCallsign() const
Own aircraft's callsign.
bool updateOwnSituation(const swift::misc::aviation::CAircraftSituation &situation)
Update own situation.
QObject * asQObject()
Return as QObject.
bool updateOwnModel(const swift::misc::simulation::CAircraftModel &model)
Update model.
CContextOwnAircraft(CCoreFacadeConfig::ContextMode, CCoreFacade *runtime)
Constructor, with link to runtime.
bool updateOwnParts(const swift::misc::aviation::CAircraftParts &parts)
Update own parts.
swift::misc::aviation::CAircraftParts getOwnAircraftParts() const
Own aircraft's parts.
bool updateOwnCG(const swift::misc::physical_quantities::CLength &cg)
Update own parts.
static void registerHelp()
Register help.
Base class with a member CIdentifier to be inherited by a class which has an identity in the environm...
Value object encapsulating information identifying a component of a modular distributed swift process...
Class template for accessing a specific value in the CSettingsCache.
static void registerCommand(const CommandHtmlHelp &command)
Register a command.
static bool registered(const QString &helpContext)
Help already registered.
Base class for providers.
Value object for ICAO classification.
Value object encapsulating information of aircraft's parts.
Value object encapsulating information of an aircraft's situation.
List of aircraft situations.
Value object for ICAO classification.
Altitude as used in aviation, can be AGL or MSL altitude.
Value object encapsulating information of a callsign.
COM system (aka "radio").
TransponderMode
Transponder codes.
Geodetic coordinate, a position in 3D space relative to the reference geoid.
Value object encapsulating information of a user.
Physical unit length (length).
Aircraft model (used by another pilot, my models on disk).
Comprehensive information of an aircraft.
Direct threadsafe in memory access to own aircraft.
#define SWIFT_CORE_CONTEXTOWNAIRCRAFT_INTERFACENAME
DBus interface for context.
Backend services of the swift project, like dealing with the network or the simulators.
Free functions in swift::misc.
#define SWIFT_CORE_EXPORT
Export a class or function from the library.