mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-14 16:55:36 +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());
|
return this->m_situation.propertyByIndex(index.copyFrontRemoved());
|
||||||
case IndexIcao:
|
case IndexIcao:
|
||||||
return this->m_icao.propertyByIndex(index.copyFrontRemoved());
|
return this->m_icao.propertyByIndex(index.copyFrontRemoved());
|
||||||
|
case IndexParts:
|
||||||
|
return this->m_parts.propertyByIndex(index.copyFrontRemoved());
|
||||||
default:
|
default:
|
||||||
return (ICoordinateGeodetic::canHandleIndex(index)) ?
|
return (ICoordinateGeodetic::canHandleIndex(index)) ?
|
||||||
ICoordinateGeodetic::propertyByIndex(index) :
|
ICoordinateGeodetic::propertyByIndex(index) :
|
||||||
@@ -202,6 +204,9 @@ namespace BlackMisc
|
|||||||
case IndexSituation:
|
case IndexSituation:
|
||||||
this->m_situation.setPropertyByIndex(variant, index.copyFrontRemoved());
|
this->m_situation.setPropertyByIndex(variant, index.copyFrontRemoved());
|
||||||
break;
|
break;
|
||||||
|
case IndexParts:
|
||||||
|
this->m_parts.setPropertyByIndex(variant, index.copyFrontRemoved());
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
CValueObject::setPropertyByIndex(variant, index);
|
CValueObject::setPropertyByIndex(variant, index);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
#include "avselcal.h"
|
#include "avselcal.h"
|
||||||
#include "aviotransponder.h"
|
#include "aviotransponder.h"
|
||||||
#include "aviocomsystem.h"
|
#include "aviocomsystem.h"
|
||||||
|
#include "aviation/aircraftparts.h"
|
||||||
#include "valueobject.h"
|
#include "valueobject.h"
|
||||||
#include "namevariantpairlist.h"
|
#include "namevariantpairlist.h"
|
||||||
#include "propertyindex.h"
|
#include "propertyindex.h"
|
||||||
@@ -42,7 +43,8 @@ namespace BlackMisc
|
|||||||
IndexCom2System,
|
IndexCom2System,
|
||||||
IndexTransponder,
|
IndexTransponder,
|
||||||
IndexSituation,
|
IndexSituation,
|
||||||
IndexIcao
|
IndexIcao,
|
||||||
|
IndexParts
|
||||||
};
|
};
|
||||||
|
|
||||||
//! Default constructor.
|
//! Default constructor.
|
||||||
@@ -239,6 +241,12 @@ namespace BlackMisc
|
|||||||
//! Meaningful default settings for Transponder
|
//! Meaningful default settings for Transponder
|
||||||
void initTransponder();
|
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
|
//! \copydoc CValueObject::propertyByIndex
|
||||||
virtual CVariant propertyByIndex(const BlackMisc::CPropertyIndex &index) const override;
|
virtual CVariant propertyByIndex(const BlackMisc::CPropertyIndex &index) const override;
|
||||||
|
|
||||||
@@ -257,13 +265,25 @@ namespace BlackMisc
|
|||||||
CComSystem m_com1system;
|
CComSystem m_com1system;
|
||||||
CComSystem m_com2system;
|
CComSystem m_com2system;
|
||||||
CTransponder m_transponder;
|
CTransponder m_transponder;
|
||||||
|
CAircraftParts m_parts;
|
||||||
CSelcal m_selcal;
|
CSelcal m_selcal;
|
||||||
CAircraftIcao m_icao;
|
CAircraftIcao m_icao;
|
||||||
};
|
};
|
||||||
} // namespace
|
} // namespace
|
||||||
} // 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)
|
Q_DECLARE_METATYPE(BlackMisc::Aviation::CAircraft)
|
||||||
|
|
||||||
#endif // guard
|
#endif // guard
|
||||||
|
|||||||
Reference in New Issue
Block a user