swift
flightgearmpaircraft.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2019 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
5 
6 #ifndef SWIFT_SIMPLUGIN_FLIGHTGEAR_FGPLANEMPAIRCRAFT_H
7 #define SWIFT_SIMPLUGIN_FLIGHTGEAR_FGPLANEMPAIRCRAFT_H
8 
9 #include <QSharedPointer>
10 #include <QStringList>
11 
14 
15 namespace swift::core
16 {
17  class ISimulator;
18 }
19 namespace swift::simplugin::flightgear
20 {
23  {
24  public:
27 
30  swift::core::ISimulator *simulator,
32 
35 
38 
40  const swift::misc::aviation::CCallsign &getCallsign() const { return m_aircraft.getCallsign(); }
41 
43  bool hasCallsign() const { return m_aircraft.hasCallsign(); }
44 
46  const swift::misc::simulation::CSimulatedAircraft &getAircraft() const { return m_aircraft; }
47 
49  const QString &getAircraftModelString() const { return m_aircraft.getModelString(); }
50 
52  const swift::misc::simulation::CAircraftModel &getAircraftModel() const { return m_aircraft.getModel(); }
53 
55  QString
57 
60 
63  getInterpolation(qint64 currentTimeSinceEpoch,
65  uint32_t aircraftNumber) const;
66 
70 
72  swift::misc::simulation::CInterpolatorMulti *getInterpolator() const { return m_interpolator.data(); }
73 
74  private:
76  QSharedPointer<swift::misc::simulation::CInterpolatorMulti>
77  m_interpolator;
78  };
79 
81  class CFlightgearMPAircraftObjects : public QHash<swift::misc::aviation::CCallsign, CFlightgearMPAircraft>
82  {
83  public:
86 
88  QStringList getAllCallsignStrings(bool sorted = false) const;
89 
91  QString getAllCallsignStringsAsString(bool sorted = false, const QString &separator = ", ") const;
92 
95 
98  };
99 } // namespace swift::simplugin::flightgear
100 
101 #endif // SWIFT_SIMPLUGIN_FLIGHTGEAR_FGPLANEMPAIRCRAFT_H
Interface to a simulator.
Definition: simulator.h:59
Status messages, e.g. from Core -> GUI.
Value object encapsulating information of a callsign.
Definition: callsign.h:30
Value object for a set of callsigns.
Definition: callsignset.h:26
Aircraft model (used by another pilot, my models on disk)
Definition: aircraftmodel.h:71
Value object for interpolator and rendering per callsign.
Record internal state of interpolator for debugging.
Multiplexed interpolator which allows switching between modes at runtime.
Comprehensive information of an aircraft.
bool hasCallsign() const
Callsign not empty, no further checks.
const aviation::CCallsign & getCallsign() const
Get callsign.
const simulation::CAircraftModel & getModel() const
Get model (model used for mapping)
const QString & getModelString() const
Get model string.
Class representing a Flightgear multiplayer aircraft.
const swift::misc::simulation::CAircraftModel & getAircraftModel() const
Simulated aircraft model.
const swift::misc::simulation::CSimulatedAircraft & getAircraft() const
Simulated aircraft (as added)
const QString & getAircraftModelString() const
Simulated aircraft model string.
swift::misc::simulation::CInterpolationResult getInterpolation(qint64 currentTimeSinceEpoch, const swift::misc::simulation::CInterpolationAndRenderingSetupPerCallsign &setup, uint32_t aircraftNumber) const
Get interpolated situation.
swift::misc::simulation::CInterpolatorMulti * getInterpolator() const
Interpolator.
swift::misc::CStatusMessageList getInterpolationMessages(swift::misc::simulation::CInterpolationAndRenderingSetupBase::InterpolatorMode mode) const
Interpolation messages.
void attachInterpolatorLogger(swift::misc::simulation::CInterpolationLogger *logger) const
Attach an observer to read the interpolator's state for debugging.
QString getInterpolatorInfo(swift::misc::simulation::CInterpolationAndRenderingSetupBase::InterpolatorMode mode) const
Get an interpolator info string (for debug info)
void setSimulatedAircraft(const swift::misc::simulation::CSimulatedAircraft &simulatedAircraft)
Set simulated aircraft.
const swift::misc::aviation::CCallsign & getCallsign() const
Get callsign.
void toggleInterpolatorMode(const swift::misc::aviation::CCallsign &callsign)
Toggle interpolator modes.
void toggleInterpolatorModes()
Toggle interpolator modes.
QStringList getAllCallsignStrings(bool sorted=false) const
Get all callsign strings.
QString getAllCallsignStringsAsString(bool sorted=false, const QString &separator=", ") const
Get all callsign strings as string.
swift::misc::aviation::CCallsignSet getAllCallsigns() const
Get all callsigns.
Backend services of the swift project, like dealing with the network or the simulators.
Definition: actionbind.cpp:7