mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 21:15:33 +08:00
refs #328 add CAircraftParts to CAircraft
Conflicts: src/blackmisc/avaircraft.h
This commit is contained in:
committed by
Klaus Basan
parent
0a46a4a0bd
commit
ccec06fc80
@@ -161,6 +161,8 @@ namespace BlackMisc
|
||||
return this->m_situation.propertyByIndex(index.copyFrontRemoved());
|
||||
case IndexIcao:
|
||||
return this->m_icao.propertyByIndex(index.copyFrontRemoved());
|
||||
case IndexParts:
|
||||
return this->m_parts.propertyByIndex(index.copyFrontRemoved());
|
||||
default:
|
||||
return (ICoordinateGeodetic::canHandleIndex(index)) ?
|
||||
ICoordinateGeodetic::propertyByIndex(index) :
|
||||
@@ -202,6 +204,9 @@ namespace BlackMisc
|
||||
case IndexSituation:
|
||||
this->m_situation.setPropertyByIndex(variant, index.copyFrontRemoved());
|
||||
break;
|
||||
case IndexParts:
|
||||
this->m_parts.setPropertyByIndex(variant, index.copyFrontRemoved());
|
||||
break;
|
||||
default:
|
||||
CValueObject::setPropertyByIndex(variant, index);
|
||||
break;
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "avselcal.h"
|
||||
#include "aviotransponder.h"
|
||||
#include "aviocomsystem.h"
|
||||
#include "aviation/aircraftparts.h"
|
||||
#include "valueobject.h"
|
||||
#include "namevariantpairlist.h"
|
||||
#include "propertyindex.h"
|
||||
@@ -42,7 +43,8 @@ namespace BlackMisc
|
||||
IndexCom2System,
|
||||
IndexTransponder,
|
||||
IndexSituation,
|
||||
IndexIcao
|
||||
IndexIcao,
|
||||
IndexParts
|
||||
};
|
||||
|
||||
//! Default constructor.
|
||||
@@ -239,6 +241,12 @@ namespace BlackMisc
|
||||
//! Meaningful default settings for Transponder
|
||||
void initTransponder();
|
||||
|
||||
//! Get aircraft parts
|
||||
const BlackMisc::Aviation::CAircraftParts &getParts() const { return m_parts; }
|
||||
|
||||
//! Set aircraft parts
|
||||
void setParts(const BlackMisc::Aviation::CAircraftParts &parts) { m_parts = parts; }
|
||||
|
||||
//! \copydoc CValueObject::propertyByIndex
|
||||
virtual CVariant propertyByIndex(const BlackMisc::CPropertyIndex &index) const override;
|
||||
|
||||
@@ -257,13 +265,25 @@ namespace BlackMisc
|
||||
CComSystem m_com1system;
|
||||
CComSystem m_com2system;
|
||||
CTransponder m_transponder;
|
||||
CAircraftParts m_parts;
|
||||
CSelcal m_selcal;
|
||||
CAircraftIcao m_icao;
|
||||
};
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
BLACK_DECLARE_TUPLE_CONVERSION(BlackMisc::Aviation::CAircraft, (o.m_callsign, o.m_pilot, o.m_situation, o.m_com1system, o.m_com2system, o.m_transponder, o.m_icao, o.m_distanceToOwnAircraft, o.m_bearingToOwnAircraft))
|
||||
BLACK_DECLARE_TUPLE_CONVERSION(BlackMisc::Aviation::CAircraft, (
|
||||
o.m_callsign,
|
||||
o.m_pilot,
|
||||
o.m_situation,
|
||||
o.m_com1system,
|
||||
o.m_com2system,
|
||||
o.m_transponder,
|
||||
o.m_parts,
|
||||
o.m_icao,
|
||||
o.m_distanceToPlane,
|
||||
o.m_bearingToOwnAircraft))
|
||||
|
||||
Q_DECLARE_METATYPE(BlackMisc::Aviation::CAircraft)
|
||||
|
||||
#endif // guard
|
||||
|
||||
Reference in New Issue
Block a user