mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-02 15:15:39 +08:00
refs #445, value objects and containers
* common base class for DB based classes * common base class for DB based containers * Livery, distributor value class * adjusted value classes to livery * utility functions for DB values (blackmisc free functions) * register new objects with metadata system
This commit is contained in:
committed by
Mathew Sutcliffe
parent
99b7c52383
commit
25fd0f4f2d
@@ -21,6 +21,7 @@
|
||||
#include "blackmisc/aviation/transponder.h"
|
||||
#include "blackmisc/aviation/comsystem.h"
|
||||
#include "blackmisc/aviation/aircraftparts.h"
|
||||
#include "blackmisc/aviation/livery.h"
|
||||
#include "blackmisc/valueobject.h"
|
||||
#include "blackmisc/namevariantpairlist.h"
|
||||
#include "blackmisc/propertyindex.h"
|
||||
@@ -47,6 +48,7 @@ namespace BlackMisc
|
||||
IndexTransponder,
|
||||
IndexSituation,
|
||||
IndexIcao,
|
||||
IndexLivery,
|
||||
IndexParts,
|
||||
IndexIsVtol
|
||||
};
|
||||
@@ -93,6 +95,12 @@ namespace BlackMisc
|
||||
//! Set ICAO info
|
||||
virtual void setIcaoInfo(const CAircraftIcaoData &icao) { m_icao = icao; }
|
||||
|
||||
//! Get livery
|
||||
const BlackMisc::Aviation::CLivery &getLivery() const { return m_livery; }
|
||||
|
||||
//! Livery
|
||||
virtual void setLivery(const BlackMisc::Aviation::CLivery &livery) { this->m_livery = livery; }
|
||||
|
||||
//! Set aircraft ICAO designator
|
||||
virtual void setAircraftIcaoDesignator(const QString &designator) { m_icao.setAircraftDesignator(designator); }
|
||||
|
||||
@@ -289,6 +297,7 @@ namespace BlackMisc
|
||||
CAircraftParts m_parts;
|
||||
CSelcal m_selcal;
|
||||
CAircraftIcaoData m_icao;
|
||||
CLivery m_livery;
|
||||
};
|
||||
} // namespace
|
||||
} // namespace
|
||||
@@ -302,6 +311,7 @@ BLACK_DECLARE_TUPLE_CONVERSION(BlackMisc::Aviation::CAircraft, (
|
||||
o.m_transponder,
|
||||
o.m_parts,
|
||||
o.m_icao,
|
||||
o.m_livery,
|
||||
o.m_distanceToOwnAircraft,
|
||||
o.m_bearingToOwnAircraft
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user