mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
#include "aircraftcfgentries.h"
|
||||
#include "blackmisc/blackmiscfreefunctions.h"
|
||||
|
||||
using namespace BlackMisc;
|
||||
|
||||
namespace BlackSim
|
||||
{
|
||||
namespace FsCommon
|
||||
@@ -24,19 +26,19 @@ namespace BlackSim
|
||||
/*
|
||||
* Operator ==
|
||||
*/
|
||||
bool CAircraftCfgEntries::operator ==(const CAircraftCfgEntries &otherEntry) const
|
||||
bool CAircraftCfgEntries::operator ==(const CAircraftCfgEntries &other) const
|
||||
{
|
||||
if (this == &otherEntry) return true;
|
||||
return this->m_title == otherEntry.m_title;
|
||||
if (this == &other) return true;
|
||||
return TupleConverter<CAircraftCfgEntries>::toTuple(*this) == TupleConverter<CAircraftCfgEntries>::toTuple(other);
|
||||
}
|
||||
|
||||
/*
|
||||
* Operator !=
|
||||
*/
|
||||
bool CAircraftCfgEntries::operator !=(const CAircraftCfgEntries &otherEntry) const
|
||||
bool CAircraftCfgEntries::operator !=(const CAircraftCfgEntries &other) const
|
||||
{
|
||||
if (this == &otherEntry) return false;
|
||||
return !((*this) == otherEntry);
|
||||
if (this == &other) return false;
|
||||
return !((*this) == other);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -89,14 +91,7 @@ namespace BlackSim
|
||||
*/
|
||||
uint CAircraftCfgEntries::getValueHash() const
|
||||
{
|
||||
QList<uint> hashs;
|
||||
hashs << qHash(this->m_atcModel);
|
||||
hashs << qHash(this->m_atcParkingCode);
|
||||
hashs << qHash(this->m_atcType);
|
||||
hashs << qHash(this->m_filePath);
|
||||
hashs << qHash(this->m_index);
|
||||
hashs << qHash(this->m_title);
|
||||
return BlackMisc::calculateHash(hashs, "CAircraftCfgEntries");
|
||||
return qHash(TupleConverter<CAircraftCfgEntries>::toTuple(*this));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -114,16 +109,7 @@ namespace BlackSim
|
||||
int CAircraftCfgEntries::compareImpl(const CValueObject &otherBase) const
|
||||
{
|
||||
const auto &other = static_cast<const CAircraftCfgEntries &>(otherBase);
|
||||
if (this->m_index != other.m_index)
|
||||
{
|
||||
return (this->m_index > other.m_index) ? 1 : -1;
|
||||
}
|
||||
int result;
|
||||
if ((result = this->m_atcModel.compare(other.m_atcModel, Qt::CaseInsensitive))) return result;
|
||||
if ((result = this->m_atcParkingCode.compare(other.m_atcParkingCode, Qt::CaseInsensitive))) return result;
|
||||
if ((result = this->m_atcType.compare(other.m_atcType, Qt::CaseInsensitive))) return result;;
|
||||
if ((result = this->m_filePath.compare(other.m_filePath, Qt::CaseInsensitive))) return result;;
|
||||
return this->m_title.compare(other.m_title, Qt::CaseInsensitive);
|
||||
return compare(TupleConverter<CAircraftCfgEntries>::toTuple(*this), TupleConverter<CAircraftCfgEntries>::toTuple(other));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -139,12 +125,7 @@ namespace BlackSim
|
||||
*/
|
||||
void CAircraftCfgEntries::marshallToDbus(QDBusArgument &argument) const
|
||||
{
|
||||
argument << this->m_atcModel;
|
||||
argument << this->m_atcParkingCode;
|
||||
argument << this->m_atcType;
|
||||
argument << this->m_filePath;
|
||||
argument << this->m_index;
|
||||
argument << this->m_title;
|
||||
argument << TupleConverter<CAircraftCfgEntries>::toTuple(*this);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -152,12 +133,7 @@ namespace BlackSim
|
||||
*/
|
||||
void CAircraftCfgEntries::unmarshallFromDbus(const QDBusArgument &argument)
|
||||
{
|
||||
argument >> this->m_atcModel;
|
||||
argument >> this->m_atcParkingCode;
|
||||
argument >> this->m_atcType;
|
||||
argument >> this->m_filePath;
|
||||
argument >> this->m_index;
|
||||
argument >> this->m_title;
|
||||
argument >> TupleConverter<CAircraftCfgEntries>::toTuple(*this);
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
|
||||
@@ -22,6 +22,7 @@ namespace BlackSim
|
||||
class CAircraftCfgEntries: public BlackMisc::CValueObject
|
||||
{
|
||||
private:
|
||||
BLACK_ENABLE_TUPLE_CONVERSION(CAircraftCfgEntries)
|
||||
qint32 m_index; //!< current index in given config
|
||||
QString m_filePath; //!< file path of aircraft.cfg
|
||||
QString m_title; //!< Title in aircraft.cfg
|
||||
@@ -76,10 +77,10 @@ namespace BlackSim
|
||||
virtual ~CAircraftCfgEntries() {}
|
||||
|
||||
//! \brief operator ==
|
||||
bool operator ==(const CAircraftCfgEntries &otherEntry) const;
|
||||
bool operator ==(const CAircraftCfgEntries &other) const;
|
||||
|
||||
//! \brief operator !=
|
||||
bool operator !=(const CAircraftCfgEntries &otherEntry) const;
|
||||
bool operator !=(const CAircraftCfgEntries &other) const;
|
||||
|
||||
//! \copydoc CValueObject::propertyByIndex
|
||||
QVariant propertyByIndex(int index) const;
|
||||
@@ -135,6 +136,7 @@ namespace BlackSim
|
||||
}
|
||||
} // namespace
|
||||
|
||||
BLACK_DECLARE_TUPLE_CONVERSION(BlackSim::FsCommon::CAircraftCfgEntries, (o.m_index, o.m_filePath, o.m_title, o.m_atcType, o.m_atcModel, o.m_atcParkingCode))
|
||||
Q_DECLARE_METATYPE(BlackSim::FsCommon::CAircraftCfgEntries)
|
||||
|
||||
#endif // guard
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#include "aircraftmapping.h"
|
||||
#include "blackmisc/blackmiscfreefunctions.h"
|
||||
|
||||
using namespace BlackMisc;
|
||||
|
||||
namespace BlackSim
|
||||
{
|
||||
namespace FsCommon
|
||||
@@ -15,7 +17,7 @@ namespace BlackSim
|
||||
* Constructor
|
||||
*/
|
||||
CAircraftMapping::CAircraftMapping() :
|
||||
m_mappingId(CAircraftMapping::InvalidId), m_proposalId(CAircraftMapping::InvalidId), m_lastChanged(-1), m_simulator(BlackSim::CSimulator::UnspecifiedSim())
|
||||
m_mappingId(CAircraftMapping::InvalidId), m_proposalId(CAircraftMapping::InvalidId), m_lastChanged(-1), m_simulatorInfo(BlackSim::CSimulatorInfo::UnspecifiedSim())
|
||||
{
|
||||
// void
|
||||
}
|
||||
@@ -26,10 +28,10 @@ namespace BlackSim
|
||||
CAircraftMapping::CAircraftMapping(
|
||||
qint32 mappingId, qint32 proposalId, const QString &fsAircraftKey, const QString &icaoAircraftDesignator,
|
||||
const QString &icaoAirline, const QString &icaoAircraftType, const QString &icaoWakeTurbulenceCategory, const QString &painting,
|
||||
const QString &lastChanged, BlackSim::CSimulator simulator) :
|
||||
m_mappingId(mappingId), m_proposalId(proposalId), m_fsAircraftKey(fsAircraftKey), m_icaoAircraftDesignator(icaoAircraftDesignator),
|
||||
m_icaoAirlineDesignator(icaoAirline), m_icaoAircraftType(icaoAircraftType), m_icaoWakeTurbulenceCategory(icaoWakeTurbulenceCategory), m_painting(painting),
|
||||
m_lastChanged(lastChanged), m_simulator(simulator), m_changed(false)
|
||||
const QString &lastChanged, BlackSim::CSimulatorInfo simulator) :
|
||||
m_mappingId(mappingId), m_proposalId(proposalId), m_fsAircraftKey(fsAircraftKey), m_aircraftDesignator(icaoAircraftDesignator),
|
||||
m_airlineDesignator(icaoAirline), m_aircraftCombinedType(icaoAircraftType), m_wakeTurbulenceCategory(icaoWakeTurbulenceCategory), m_aircraftColor(painting),
|
||||
m_lastChanged(lastChanged), m_simulatorInfo(simulator), m_changed(false)
|
||||
{
|
||||
// void
|
||||
}
|
||||
@@ -40,14 +42,7 @@ namespace BlackSim
|
||||
bool CAircraftMapping::operator ==(const CAircraftMapping &otherMapping) const
|
||||
{
|
||||
if (this == &otherMapping) return true;
|
||||
return
|
||||
this->m_mappingId == otherMapping.m_mappingId &&
|
||||
this->m_proposalId == otherMapping.m_proposalId &&
|
||||
this->m_changed == otherMapping.m_changed &&
|
||||
this->m_icaoAircraftDesignator == otherMapping.m_icaoAircraftDesignator &&
|
||||
this->m_icaoAircraftType == otherMapping.m_icaoAircraftType &&
|
||||
this->m_icaoAirlineDesignator == otherMapping.m_icaoAirlineDesignator &&
|
||||
this->m_icaoWakeTurbulenceCategory == otherMapping.m_icaoWakeTurbulenceCategory;
|
||||
return TupleConverter<CAircraftMapping>::toTuple(*this) == TupleConverter<CAircraftMapping>::toTuple(otherMapping);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -67,7 +62,7 @@ namespace BlackSim
|
||||
QString s("{%1, %2, %3, %4, %5}");
|
||||
s = s.arg(this->m_fsAircraftKey).
|
||||
arg(this->m_mappingId).arg(this->m_proposalId).
|
||||
arg(this->m_icaoAircraftDesignator).arg(this->m_simulator.toQString(i18n));
|
||||
arg(this->m_aircraftDesignator).arg(this->m_simulatorInfo.toQString(i18n));
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -80,19 +75,19 @@ namespace BlackSim
|
||||
|
||||
if (this->m_fsAircraftKey.isEmpty())
|
||||
msg.append("Missing sim key. ");
|
||||
if (this->m_icaoAircraftDesignator.isEmpty())
|
||||
if (this->m_aircraftDesignator.isEmpty())
|
||||
msg.append("Missing designator. ");
|
||||
if (this->m_simulator.isUnspecified())
|
||||
if (this->m_simulatorInfo.isUnspecified())
|
||||
msg.append("Unknown simulator. ");
|
||||
|
||||
if (this->m_icaoAircraftType.isEmpty())
|
||||
if (this->m_aircraftCombinedType.isEmpty())
|
||||
msg.append("Missing type. ");
|
||||
else if (this->m_icaoAircraftType.length() != 3)
|
||||
else if (this->m_aircraftCombinedType.length() != 3)
|
||||
msg.append("Wrong type length (req.3). ");
|
||||
|
||||
if (this->m_icaoWakeTurbulenceCategory.isEmpty() || this->m_icaoWakeTurbulenceCategory.length() != 1)
|
||||
if (this->m_wakeTurbulenceCategory.isEmpty() || this->m_wakeTurbulenceCategory.length() != 1)
|
||||
msg.append("Invalid WTC. ");
|
||||
else if (this->m_icaoWakeTurbulenceCategory != "L" && this->m_icaoWakeTurbulenceCategory != "M" && this->m_icaoWakeTurbulenceCategory != "H")
|
||||
else if (this->m_wakeTurbulenceCategory != "L" && this->m_wakeTurbulenceCategory != "M" && this->m_wakeTurbulenceCategory != "H")
|
||||
msg.append("Invalid WTC code. ");
|
||||
|
||||
return msg.trimmed();
|
||||
@@ -114,19 +109,7 @@ namespace BlackSim
|
||||
*/
|
||||
uint CAircraftMapping::getValueHash() const
|
||||
{
|
||||
QList<uint> hashs;
|
||||
hashs << qHash(this->m_changed);
|
||||
hashs << qHash(this->m_fsAircraftKey);
|
||||
hashs << qHash(this->m_icaoAircraftDesignator);
|
||||
hashs << qHash(this->m_icaoAircraftType);
|
||||
hashs << qHash(this->m_icaoAirlineDesignator);
|
||||
hashs << qHash(this->m_icaoWakeTurbulenceCategory);
|
||||
hashs << qHash(this->m_lastChanged);
|
||||
hashs << qHash(this->m_mappingId);
|
||||
hashs << qHash(this->m_painting);
|
||||
hashs << qHash(this->m_proposalId);
|
||||
hashs << qHash(this->m_simulator);
|
||||
return BlackMisc::calculateHash(hashs, "CAircraftMapping");
|
||||
return qHash(TupleConverter<CAircraftMapping>::toTuple(*this));
|
||||
}
|
||||
|
||||
|
||||
@@ -144,20 +127,20 @@ namespace BlackSim
|
||||
return m_proposalId;
|
||||
case IndexAircraftKey:
|
||||
return m_fsAircraftKey;
|
||||
case IndexIcaoAircraftDesignator:
|
||||
return m_icaoAircraftDesignator;
|
||||
case IndexIcaoAirlineDesignator:
|
||||
return m_icaoAirlineDesignator;
|
||||
case IndexAircraftType:
|
||||
return m_icaoAircraftType;
|
||||
case IndexAircraftDesignator:
|
||||
return m_aircraftDesignator;
|
||||
case IndexAirlineDesignator:
|
||||
return m_airlineDesignator;
|
||||
case IndexAircraftCombinedType:
|
||||
return m_aircraftCombinedType;
|
||||
case IndexWakeTurbulenceCategory:
|
||||
return m_icaoWakeTurbulenceCategory;
|
||||
case IndexPainting:
|
||||
return this->m_painting;
|
||||
return m_wakeTurbulenceCategory;
|
||||
case IndexAirlineColor:
|
||||
return this->m_aircraftColor;
|
||||
case IndexLastChanged:
|
||||
return this->getLastChangedFormatted();
|
||||
case IndexSimulator:
|
||||
return this->m_simulator.toQVariant();
|
||||
case IndexSimulatorInfo:
|
||||
return this->m_simulatorInfo.toQVariant();
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -197,24 +180,24 @@ namespace BlackSim
|
||||
m_fsAircraftKey = value.toString();
|
||||
changed = true;
|
||||
break;
|
||||
case IndexIcaoAircraftDesignator:
|
||||
this->setIcaoAircraftDesignator(value.toString());
|
||||
case IndexAircraftDesignator:
|
||||
this->setAircraftDesignator(value.toString());
|
||||
changed = true;
|
||||
break;
|
||||
case IndexIcaoAirlineDesignator:
|
||||
this->setIcaoAirline(value.toString());
|
||||
case IndexAirlineDesignator:
|
||||
this->setAirlineDesignator(value.toString());
|
||||
changed = true;
|
||||
break;
|
||||
case IndexAircraftType:
|
||||
this->setIcaoAircraftType(value.toString());
|
||||
case IndexAircraftCombinedType:
|
||||
this->setAircraftCombinedType(value.toString());
|
||||
changed = true;
|
||||
break;
|
||||
case IndexWakeTurbulenceCategory:
|
||||
this->setIcaoWakeTurbulenceCategory(value.toString());
|
||||
this->setWakeTurbulenceCategory(value.toString());
|
||||
changed = true;
|
||||
break;
|
||||
case IndexPainting:
|
||||
this->m_painting = value.toString();
|
||||
case IndexAirlineColor:
|
||||
this->m_aircraftColor = value.toString();
|
||||
changed = true;
|
||||
break;
|
||||
default:
|
||||
@@ -224,37 +207,20 @@ namespace BlackSim
|
||||
if (changed) this->setChanged(changed);
|
||||
}
|
||||
|
||||
/*
|
||||
* Marshall to Dbus
|
||||
*/
|
||||
void CAircraftMapping::marshallToDbus(QDBusArgument &argument) const
|
||||
{
|
||||
argument << this->m_changed;
|
||||
argument << this->m_fsAircraftKey;
|
||||
argument << this->m_icaoAircraftDesignator;
|
||||
argument << this->m_icaoAircraftType;
|
||||
argument << this->m_icaoAirlineDesignator;
|
||||
argument << this->m_icaoWakeTurbulenceCategory;
|
||||
argument << this->m_lastChanged;
|
||||
argument << this->m_mappingId;
|
||||
argument << this->m_painting;
|
||||
argument << this->m_proposalId;
|
||||
argument << this->m_simulator;
|
||||
argument << TupleConverter<CAircraftMapping>::toTuple(*this);
|
||||
}
|
||||
|
||||
/*
|
||||
* Unmarshall from DBus
|
||||
* Unmarshall from Dbus
|
||||
*/
|
||||
void CAircraftMapping::unmarshallFromDbus(const QDBusArgument &argument)
|
||||
{
|
||||
argument >> this->m_changed;
|
||||
argument >> this->m_fsAircraftKey;
|
||||
argument >> this->m_icaoAircraftDesignator;
|
||||
argument >> this->m_icaoAircraftType;
|
||||
argument >> this->m_icaoAirlineDesignator;
|
||||
argument >> this->m_icaoWakeTurbulenceCategory;
|
||||
argument >> this->m_lastChanged;
|
||||
argument >> this->m_mappingId;
|
||||
argument >> this->m_painting;
|
||||
argument >> this->m_proposalId;
|
||||
argument >> this->m_simulator;
|
||||
argument >> TupleConverter<CAircraftMapping>::toTuple(*this);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -270,14 +236,8 @@ namespace BlackSim
|
||||
*/
|
||||
int CAircraftMapping::compareImpl(const CValueObject &otherBase) const
|
||||
{
|
||||
const CAircraftMapping &other = static_cast<const CAircraftMapping &>(otherBase);
|
||||
int result;
|
||||
if ((result = compare(this->m_simulator, other.m_simulator))) return result;
|
||||
if ((result = this->m_icaoAircraftDesignator.compare(other.m_icaoAircraftDesignator, Qt::CaseInsensitive))) return result;
|
||||
if ((result = this->m_icaoAirlineDesignator.compare(other.m_icaoAirlineDesignator, Qt::CaseInsensitive))) return result;
|
||||
if ((result = this->m_icaoAircraftType.compare(other.m_icaoAircraftType, Qt::CaseInsensitive))) return result;;
|
||||
if ((result = this->m_icaoWakeTurbulenceCategory.compare(other.m_icaoWakeTurbulenceCategory, Qt::CaseInsensitive))) return result;;
|
||||
return this->m_fsAircraftKey.compare(other.m_fsAircraftKey, Qt::CaseInsensitive);
|
||||
const auto &other = static_cast<const CAircraftMapping &>(otherBase);
|
||||
return compare(TupleConverter<CAircraftMapping>::toTuple(*this), TupleConverter<CAircraftMapping>::toTuple(other));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#define BLACKSIM_FSCOMMON_AIRCRAFTMAPPING_H
|
||||
|
||||
#include "aircraftcfgentries.h"
|
||||
#include "../simulator.h"
|
||||
#include "../simulatorinfo.h"
|
||||
#include "blackmisc/valueobject.h"
|
||||
#include <QVariant>
|
||||
#include <QDateTime>
|
||||
@@ -41,16 +41,17 @@ namespace BlackSim
|
||||
int compareImpl(const CValueObject &otherBase) const override;
|
||||
|
||||
private:
|
||||
BLACK_ENABLE_TUPLE_CONVERSION(CAircraftMapping)
|
||||
qint32 m_mappingId; //!< Kind of primary key for this particular mapping
|
||||
qint32 m_proposalId; //!< If proposal id of the proposal
|
||||
QString m_fsAircraftKey; //!< Id by which the simulator can create the aircraft
|
||||
QString m_icaoAircraftDesignator; //!< Aircraft designator such as B737
|
||||
QString m_icaoAirlineDesignator; //!< Airline designator such as DLH
|
||||
QString m_icaoAircraftType; //!< Engine, type, number of engines L2J, L1P
|
||||
QString m_icaoWakeTurbulenceCategory; //!< Wake turbulence category H, L, M
|
||||
QString m_painting; //!< Aircrafts painting designator, could be same as airline or specific
|
||||
QString m_aircraftDesignator; //!< Aircraft designator such as B737
|
||||
QString m_airlineDesignator; //!< Airline designator such as DLH
|
||||
QString m_aircraftCombinedType; //!< Engine, type, number of engines L2J, L1P
|
||||
QString m_wakeTurbulenceCategory; //!< Wake turbulence category H, L, M
|
||||
QString m_aircraftColor; //!< Aircrafts painting designator, could be same as airline or specific
|
||||
QString m_lastChanged; //!< Simple timestamp as YYYYMMDDhhmmss
|
||||
BlackSim::CSimulator m_simulator; //!< Mapping is for simulator
|
||||
BlackSim::CSimulatorInfo m_simulatorInfo; //!< Mapping is for simulator
|
||||
bool m_changed; //! Changed flag
|
||||
|
||||
public:
|
||||
@@ -60,13 +61,13 @@ namespace BlackSim
|
||||
IndexMappingId = 0,
|
||||
IndexProposalId,
|
||||
IndexAircraftKey,
|
||||
IndexIcaoAircraftDesignator,
|
||||
IndexIcaoAirlineDesignator,
|
||||
IndexAircraftType,
|
||||
IndexAircraftDesignator,
|
||||
IndexAirlineDesignator,
|
||||
IndexAircraftCombinedType,
|
||||
IndexWakeTurbulenceCategory,
|
||||
IndexPainting,
|
||||
IndexAirlineColor,
|
||||
IndexLastChanged,
|
||||
IndexSimulator
|
||||
IndexSimulatorInfo
|
||||
};
|
||||
|
||||
//! \brief Default mapping
|
||||
@@ -85,7 +86,7 @@ namespace BlackSim
|
||||
* \param lastChanged
|
||||
* \param simulator
|
||||
*/
|
||||
CAircraftMapping(qint32 mappingId, qint32 proposalId, const QString &fsAircraftKey, const QString &icaoAircraftDesignator, const QString &icaoAirline, const QString &icaoAircraftType, const QString &icaoWakeTurbulenceCategory, const QString &painting, const QString &lastChanged, CSimulator simulator);
|
||||
CAircraftMapping(qint32 mappingId, qint32 proposalId, const QString &fsAircraftKey, const QString &icaoAircraftDesignator, const QString &icaoAirline, const QString &icaoAircraftType, const QString &icaoWakeTurbulenceCategory, const QString &painting, const QString &lastChanged, CSimulatorInfo simulator);
|
||||
|
||||
//! \brief Virtual destructor
|
||||
virtual ~CAircraftMapping()
|
||||
@@ -107,19 +108,19 @@ namespace BlackSim
|
||||
QString getFsAircraftKey() const { return this->m_fsAircraftKey; }
|
||||
|
||||
//! \brief ICAO designator (B737)
|
||||
QString getIcaoAircraftDesignator() const { return this->m_icaoAircraftDesignator; }
|
||||
QString getAircraftDesignator() const { return this->m_aircraftDesignator; }
|
||||
|
||||
//! \brief ICAO airline (DLH)
|
||||
QString getIcaoAirline() const { return this->m_icaoAirlineDesignator; }
|
||||
QString getAirlineDesignator() const { return this->m_airlineDesignator; }
|
||||
|
||||
//! \brief ICAO aircraft type (L2J)
|
||||
QString getIcaoAircraftType() const { return this->m_icaoAircraftType; }
|
||||
QString getAircraftCombinedType() const { return this->m_aircraftCombinedType; }
|
||||
|
||||
//! \brief ICAO wake turbulence category
|
||||
QString getIcaoWakeTurbulenceCategory() const { return this->m_icaoWakeTurbulenceCategory; }
|
||||
//! \brief ICAO wake turbulence category (L,M,H)
|
||||
QString getWakeTurbulenceCategory() const { return this->m_wakeTurbulenceCategory; }
|
||||
|
||||
//! \brief Painting, basically the airline code for GA planes
|
||||
QString getPainting() const { return this->m_painting; }
|
||||
QString getAircraftColor() const { return this->m_aircraftColor; }
|
||||
|
||||
//! \brief Last changed timestamp YYYYMMDDhhmmss
|
||||
QString getLastChanged() const { return this->m_lastChanged; }
|
||||
@@ -128,7 +129,7 @@ namespace BlackSim
|
||||
QString getLastChangedFormatted() const;
|
||||
|
||||
//! \brief Simulator
|
||||
BlackSim::CSimulator getSimulator() const { return this->m_simulator; }
|
||||
BlackSim::CSimulatorInfo getSimulatorInfo() const { return this->m_simulatorInfo; }
|
||||
|
||||
//! \brief Simulator
|
||||
QString getSimulatorText() const;
|
||||
@@ -156,25 +157,25 @@ namespace BlackSim
|
||||
void setFsAircraftKey(const QString &aircraftKey) { this->m_fsAircraftKey = aircraftKey; }
|
||||
|
||||
//! \brief ICAO designator (B737)
|
||||
void setIcaoAircraftDesignator(const QString &icaoDesignator) { this->m_icaoAircraftDesignator = icaoDesignator.toUpper(); }
|
||||
void setAircraftDesignator(const QString &icaoDesignator) { this->m_aircraftDesignator = icaoDesignator.toUpper(); }
|
||||
|
||||
//! \brief ICAO airline (DLH)
|
||||
void setIcaoAirline(const QString &airline) { this->m_icaoAirlineDesignator = airline.toUpper(); }
|
||||
void setAirlineDesignator(const QString &airline) { this->m_airlineDesignator = airline.toUpper(); }
|
||||
|
||||
//! \brief ICAO aircraft type (L2J)
|
||||
void setIcaoAircraftType(const QString &aircraftType) { this->m_icaoAircraftType = aircraftType.toUpper(); }
|
||||
void setAircraftCombinedType(const QString &aircraftType) { this->m_aircraftCombinedType = aircraftType.toUpper(); }
|
||||
|
||||
//! \brief ICAO wake turbulence category
|
||||
void setIcaoWakeTurbulenceCategory(const QString &wtc) { this->m_icaoWakeTurbulenceCategory = wtc.toUpper(); }
|
||||
void setWakeTurbulenceCategory(const QString &wtc) { this->m_wakeTurbulenceCategory = wtc.toUpper(); }
|
||||
|
||||
//! \brief Painting, basically the airline code for GA planes
|
||||
void setPainting(const QString &painting) { this->m_painting = painting; }
|
||||
void setAircraftColor(const QString &painting) { this->m_aircraftColor = painting; }
|
||||
|
||||
//! \brief Last changed timestamp YYYYMMDDhhmmss
|
||||
void setLastChanged(qint32 lastChanged) { this->m_lastChanged = lastChanged; }
|
||||
|
||||
//! \brief Simulator
|
||||
void setSimulator(BlackSim::CSimulator simulator) { this->m_simulator = simulator; }
|
||||
void setSimulator(BlackSim::CSimulatorInfo simulator) { this->m_simulatorInfo = simulator; }
|
||||
|
||||
//! \brief Set simulator text
|
||||
void setSimulatorText(const QString &simulator);
|
||||
@@ -211,6 +212,7 @@ namespace BlackSim
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
BLACK_DECLARE_TUPLE_CONVERSION(BlackSim::FsCommon::CAircraftMapping, (o.m_mappingId, o.m_proposalId, o.m_fsAircraftKey, o.m_aircraftDesignator, o.m_airlineDesignator, o.m_aircraftCombinedType, o.m_wakeTurbulenceCategory, o.m_aircraftColor, o.m_lastChanged, o.m_simulatorInfo))
|
||||
Q_DECLARE_METATYPE(BlackSim::FsCommon::CAircraftMapping)
|
||||
|
||||
#endif // guard
|
||||
|
||||
Reference in New Issue
Block a user