From 0a46a4a0bd149c811f49063f5399db3e680d1566 Mon Sep 17 00:00:00 2001 From: Roland Winklmeier Date: Mon, 12 Jan 2015 14:04:43 +0100 Subject: [PATCH] refs #328 CAircraftParts value classes --- src/blackmisc/avallclasses.h | 5 + src/blackmisc/aviation/aircraftengine.cpp | 23 +++ src/blackmisc/aviation/aircraftengine.h | 64 ++++++++ src/blackmisc/aviation/aircraftenginelist.cpp | 31 ++++ src/blackmisc/aviation/aircraftenginelist.h | 77 +++++++++ src/blackmisc/aviation/aircraftlights.cpp | 49 ++++++ src/blackmisc/aviation/aircraftlights.h | 102 ++++++++++++ src/blackmisc/aviation/aircraftparts.cpp | 33 ++++ src/blackmisc/aviation/aircraftparts.h | 146 ++++++++++++++++++ src/blackmisc/aviation/aircraftpartslist.cpp | 49 ++++++ src/blackmisc/aviation/aircraftpartslist.h | 57 +++++++ src/blackmisc/blackmisc.pro | 11 +- .../blackmiscfreefunctions_avmeta.cpp | 5 + 13 files changed, 648 insertions(+), 4 deletions(-) create mode 100644 src/blackmisc/aviation/aircraftengine.cpp create mode 100644 src/blackmisc/aviation/aircraftengine.h create mode 100644 src/blackmisc/aviation/aircraftenginelist.cpp create mode 100644 src/blackmisc/aviation/aircraftenginelist.h create mode 100644 src/blackmisc/aviation/aircraftlights.cpp create mode 100644 src/blackmisc/aviation/aircraftlights.h create mode 100644 src/blackmisc/aviation/aircraftparts.cpp create mode 100644 src/blackmisc/aviation/aircraftparts.h create mode 100644 src/blackmisc/aviation/aircraftpartslist.cpp create mode 100644 src/blackmisc/aviation/aircraftpartslist.h diff --git a/src/blackmisc/avallclasses.h b/src/blackmisc/avallclasses.h index 72fb8f897..765ff6d56 100644 --- a/src/blackmisc/avallclasses.h +++ b/src/blackmisc/avallclasses.h @@ -24,5 +24,10 @@ #include "blackmisc/avinformationmessage.h" #include "blackmisc/avselcal.h" #include "blackmisc/avflightplan.h" +#include "blackmisc/aviation/aircraftengine.h" +#include "blackmisc/aviation/aircraftenginelist.h" +#include "blackmisc/aviation/aircraftlights.h" +#include "blackmisc/aviation/aircraftparts.h" +#include "blackmisc/aviation/aircraftpartslist.h" #endif // guard diff --git a/src/blackmisc/aviation/aircraftengine.cpp b/src/blackmisc/aviation/aircraftengine.cpp new file mode 100644 index 000000000..b944d4927 --- /dev/null +++ b/src/blackmisc/aviation/aircraftengine.cpp @@ -0,0 +1,23 @@ +/* Copyright (C) 2014 + * swift project Community / Contributors + * + * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level + * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project, + * including this file, may be copied, modified, propagated, or distributed except according to the terms + * contained in the LICENSE file. + */ + +#include "aircraftengine.h" + +namespace BlackMisc +{ + namespace Aviation + { + QString CAircraftEngine::convertToQString(bool /** i18n */) const + { + QString s(m_number); + s += m_on; + return s; + } + } // namespace +} // namespace diff --git a/src/blackmisc/aviation/aircraftengine.h b/src/blackmisc/aviation/aircraftengine.h new file mode 100644 index 000000000..d8e9fc526 --- /dev/null +++ b/src/blackmisc/aviation/aircraftengine.h @@ -0,0 +1,64 @@ +/* Copyright (C) 2014 + * swift project Community / Contributors + * + * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level + * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project, + * including this file, may be copied, modified, propagated, or distributed except according to the terms + * contained in the LICENSE file. + */ + +//! \file + +#ifndef BLACKMISC_AIRCRAFTENGINES_H +#define BLACKMISC_AIRCRAFTENGINES_H + +#include "blackmisc/valueobject.h" + +namespace BlackMisc +{ + namespace Aviation + { + //! Value object encapsulating information about aircraft's engines + class CAircraftEngine : public CValueObjectStdTuple + { + public: + + //! Default constructor + CAircraftEngine() = default; + + //! Constructor + CAircraftEngine(int number, bool on) : m_number(number), m_on(on) {} + + //! Get engine number + int getNumber() const { return m_number; } + + //! Set engine number + void setNumber (int number) { m_number = number; } + + //! Is on/off? + bool isOn() const { return m_on; } + + //! Set to on/off + void setOn(bool on) { m_on = on; } + + protected: + //! \copydoc CValueObject::convertToQString + virtual QString convertToQString(bool i18n = false) const override; + + private: + BLACK_ENABLE_TUPLE_CONVERSION(CAircraftEngine) + int m_number = 1; + bool m_on = true; + + }; + } // namespace +} // namespace + +BLACK_DECLARE_TUPLE_CONVERSION(BlackMisc::Aviation::CAircraftEngine, ( + attr(o.m_number, flags()), + attr(o.m_on, "on") + )) + +Q_DECLARE_METATYPE(BlackMisc::Aviation::CAircraftEngine) + +#endif // BLACKMISC_AIRCRAFTENGINES_H diff --git a/src/blackmisc/aviation/aircraftenginelist.cpp b/src/blackmisc/aviation/aircraftenginelist.cpp new file mode 100644 index 000000000..09cdd4d78 --- /dev/null +++ b/src/blackmisc/aviation/aircraftenginelist.cpp @@ -0,0 +1,31 @@ +/* Copyright (C) 2014 + * swift project Community / Contributors + * + * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level + * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project, + * including this file, may be copied, modified, propagated, or distributed except according to the terms + * contained in the LICENSE file. + */ + +#include "aircraftenginelist.h" + +namespace BlackMisc +{ + namespace Aviation + { + CAircraftEngineList::CAircraftEngineList(const CSequence &other) : + CSequence(other) + { } + + void CAircraftEngineList::registerMetadata() + { + qRegisterMetaType>(); + qDBusRegisterMetaType>(); + qRegisterMetaType>(); + qDBusRegisterMetaType>(); + qRegisterMetaType(); + qDBusRegisterMetaType(); + registerMetaValueType(); + } + } // namespace +} // namespace diff --git a/src/blackmisc/aviation/aircraftenginelist.h b/src/blackmisc/aviation/aircraftenginelist.h new file mode 100644 index 000000000..dd713083c --- /dev/null +++ b/src/blackmisc/aviation/aircraftenginelist.h @@ -0,0 +1,77 @@ +/* Copyright (C) 2014 + * swift project Community / Contributors + * + * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level + * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project, + * including this file, may be copied, modified, propagated, or distributed except according to the terms + * contained in the LICENSE file. + */ + +//! \file + +#ifndef BLACKMISC_AIRCRAFTENGINELIST_H +#define BLACKMISC_AIRCRAFTENGINELIST_H + +#include "aircraftengine.h" +#include "blackmisc/collection.h" +#include "blackmisc/sequence.h" + +namespace BlackMisc +{ + namespace Aviation + { + //! Value object encapsulating a list of aircraft engines. + class CAircraftEngineList : public CSequence + { + public: + //! Default constructor. + CAircraftEngineList() = default; + + //! Construct from a base class object. + CAircraftEngineList(const CSequence &other); + + //! \copydoc CValueObject::toQVariant + virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); } + + //! \copydoc CValueObject::convertFromQVariant + virtual void convertFromQVariant(const QVariant &variant) override { BlackMisc::setFromQVariant(this, variant); } + + virtual QJsonObject toJson() const override + { + QJsonObject map; + + for (const auto &e : *this) + { + QJsonObject value = e.toJson(); + map.insert(QString::number(e.getNumber()), value); + } + return map; + } + + //! \copydoc CValueObject::convertFromJson + virtual void convertFromJson(const QJsonObject &json) override + { + clear(); + for (const auto &e : json.keys()) + { + + CAircraftEngine engine; + int number = e.toInt(); + engine.convertFromJson(json.value(e).toObject()); + engine.setNumber(number); + push_back(engine); + } + } + + //! Register metadata + static void registerMetadata(); + }; + + } //namespace +} // namespace + +Q_DECLARE_METATYPE(BlackMisc::Aviation::CAircraftEngineList) +Q_DECLARE_METATYPE(BlackMisc::CCollection) +Q_DECLARE_METATYPE(BlackMisc::CSequence) + +#endif //guard diff --git a/src/blackmisc/aviation/aircraftlights.cpp b/src/blackmisc/aviation/aircraftlights.cpp new file mode 100644 index 000000000..e0133c317 --- /dev/null +++ b/src/blackmisc/aviation/aircraftlights.cpp @@ -0,0 +1,49 @@ +/* Copyright (C) 2014 + * swift project Community / Contributors + * + * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level + * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project, + * including this file, may be copied, modified, propagated, or distributed except according to the terms + * contained in the LICENSE file. + */ + +#include "aircraftlights.h" + +namespace BlackMisc +{ + namespace Aviation + { + CAircraftLights::CAircraftLights(bool strobeOn, bool landingOn, bool taxiOn, bool beaconOn, bool navOn, bool logoOn) + : m_strobeOn(strobeOn), m_landingOn(landingOn), m_taxiOn(taxiOn), m_beaconOn(beaconOn), m_navOn(navOn), m_logoOn(logoOn) + { + } + + CAircraftLights CAircraftLights::allLightsOn() + { + return CAircraftLights {true, true, true, true, true, true}; + } + + CAircraftLights CAircraftLights::allLightsOff() + { + return CAircraftLights {false, false, false, false, false, false}; + } + + QString CAircraftLights::convertToQString(bool /** i18n */) const + { + QString s; + s += " strobe: "; + s += m_strobeOn; + s += " landing: "; + s += m_landingOn; + s += " taxi: "; + s += m_taxiOn; + s += " beacon: "; + s += m_beaconOn; + s += " nav: "; + s += m_navOn; + s += " logo: "; + s += m_logoOn; + return s; + } + } // namespace +} // namespace diff --git a/src/blackmisc/aviation/aircraftlights.h b/src/blackmisc/aviation/aircraftlights.h new file mode 100644 index 000000000..858d4a32a --- /dev/null +++ b/src/blackmisc/aviation/aircraftlights.h @@ -0,0 +1,102 @@ +/* Copyright (C) 2014 + * swift project Community / Contributors + * + * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level + * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project, + * including this file, may be copied, modified, propagated, or distributed except according to the terms + * contained in the LICENSE file. + */ + +//! \file + +#ifndef BLACKMISC_AIRCRAFTLIGHTS_H +#define BLACKMISC_AIRCRAFTLIGHTS_H + +#include "blackmisc/valueobject.h" + +namespace BlackMisc +{ + namespace Aviation + { + //! Value object encapsulating information about aircraft's lights + class CAircraftLights : public CValueObjectStdTuple + { + public: + + //! Default constructor + CAircraftLights() = default; + + //! Constructor + CAircraftLights(bool strobeOn, bool landingOn, bool taxiOn, bool beaconOn, bool navOn, bool logoOn); + + //! Strobes lights on? + bool isStrobeOn() const { return m_strobeOn; } + + //! Set strobe lights + void setStrobeOn(bool on) { m_strobeOn = on; } + + //! Landing lights on? + bool isLandingOn() const { return m_landingOn; } + + //! Set landing lights + void setLandingOn(bool on) { m_landingOn = on; } + + //! Taxi lights on? + bool isTaxiOn() const { return m_taxiOn; } + + //! Set taxi lights + void setTaxiOn(bool on) { m_taxiOn = on; } + + //! Beacon lights on? + bool isBeaconOn() const { return m_beaconOn; } + + //! Set beacon lights + void setBeaconOn(bool on) { m_beaconOn = on; } + + //! Nac lights on? + bool isNavOn() const { return m_navOn; } + + //! Set nav lights + void setNavOn(bool on) { m_navOn = on; } + + //! Logo lights on? + bool isLogoOn() const { return m_logoOn; } + + //! Set logo lights + void setLogoOn(bool on) { m_logoOn = on; } + + //! Returns object with all lights switched on + static CAircraftLights allLightsOn(); + + //! Returns object with all lights switched off + static CAircraftLights allLightsOff(); + + protected: + //! \copydoc CValueObject::convertToQString + virtual QString convertToQString(bool i18n = false) const override; + + private: + BLACK_ENABLE_TUPLE_CONVERSION(CAircraftLights) + bool m_strobeOn = false; + bool m_landingOn = false; + bool m_taxiOn = false; + bool m_beaconOn = false; + bool m_navOn = false; + bool m_logoOn = false; + + }; + } // namespace +} // namespace + +BLACK_DECLARE_TUPLE_CONVERSION(BlackMisc::Aviation::CAircraftLights, ( + attr(o.m_strobeOn, "strobe_on"), + attr(o.m_landingOn, "landing_on"), + attr(o.m_taxiOn, "taxi_on"), + attr(o.m_beaconOn, "beacon_on"), + attr(o.m_navOn, "nav_on"), + attr(o.m_logoOn, "logo_on") + )) + +Q_DECLARE_METATYPE(BlackMisc::Aviation::CAircraftLights) + +#endif // BLACKMISC_AIRCRAFTLIGHTS_H diff --git a/src/blackmisc/aviation/aircraftparts.cpp b/src/blackmisc/aviation/aircraftparts.cpp new file mode 100644 index 000000000..7f2e52db7 --- /dev/null +++ b/src/blackmisc/aviation/aircraftparts.cpp @@ -0,0 +1,33 @@ +/* Copyright (C) 2014 + * swift project Community / Contributors + * + * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level + * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project, + * including this file, may be copied, modified, propagated, or distributed except according to the terms + * contained in the LICENSE file. + */ + +#include "aircraftparts.h" + +namespace BlackMisc +{ + namespace Aviation + { + QString CAircraftParts::convertToQString(bool i18n) const + { + QString s; + s += m_lights.toQString(i18n); + s += " gear down: "; + s += m_gearDown; + s += " flaps pct: "; + s += m_flapsPercent; + s += " spoilers out: "; + s += m_spoilersOut; + s += " engines on: "; + s += m_engines.toQString(i18n); + s += " on ground: "; + s += m_isOnGround; + return s; + } + } // namespace +} // namespace diff --git a/src/blackmisc/aviation/aircraftparts.h b/src/blackmisc/aviation/aircraftparts.h new file mode 100644 index 000000000..32c747b09 --- /dev/null +++ b/src/blackmisc/aviation/aircraftparts.h @@ -0,0 +1,146 @@ +/* Copyright (c) 2014 + * swift project Community / Contributors + * + * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level + * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project, + * including this file, may be copied, modified, propagated, or distributed except according to the terms + * contained in the LICENSE file. + */ + +//! \file + +#ifndef BLACKMISC_AIRCRAFTPARTS_H +#define BLACKMISC_AIRCRAFTPARTS_H + +#include "blackmisc/avcallsign.h" +#include "blackmisc/valueobject.h" +#include "blackmisc/timestampbased.h" +#include "blackmisc/propertyindex.h" +#include "aircraftlights.h" +#include "aircraftenginelist.h" + +namespace BlackMisc +{ + namespace Aviation + { + //! Value object encapsulating information of aircraft's parts + class CAircraftParts : + public CValueObjectStdTuple, + public BlackMisc::ITimestampBased + { + public: + //! Properties by index + enum ColumnIndex + { + IndexLights = BlackMisc::CPropertyIndex::GlobalIndexCAircraftParts, + IndexGearDown, + IndexFlapsPercentage, + IndexSpoilersOut, + IndexEngines, + IndexOnGround, + IndexCallsign + }; + + //! Default constructor + CAircraftParts() {} + + //! Constructor + CAircraftParts(const CAircraftLights &lights, bool gearDown, int flapsPercent, bool spoilersOut, + const CAircraftEngineList &engines, bool onGround) + : m_lights(lights), m_engines(engines), m_flapsPercentage(flapsPercent), m_gearDown(gearDown), + m_spoilersOut(spoilersOut), m_isOnGround(onGround) + {} + + //! Constructor + CAircraftParts(const CCallsign &callsign, const CAircraftLights &lights, bool gearDown, int flapsPercent, bool spoilersOut, + const CAircraftEngineList &engines, bool onGround) + : m_correspondingCallsign(callsign), m_lights(lights), m_engines(engines), m_flapsPercentage(flapsPercent), m_gearDown(gearDown), + m_spoilersOut(spoilersOut), m_isOnGround(onGround) + {} + + //! \copydoc CValueObject::propertyByIndex + virtual CVariant propertyByIndex(const BlackMisc::CPropertyIndex &index) const override; + + //! \copydoc CValueObject::setPropertyByIndex + virtual void setPropertyByIndex(const CVariant &variant, const BlackMisc::CPropertyIndex &index) override; + + //! Get aircraft lights + CAircraftLights getLights() const { return m_lights; } + + //! Set aircraft lights + void setLights(const CAircraftLights &lights) { m_lights = lights; } + + //! Is gear down? + bool isGearDown() const { return m_gearDown; } + + //! Set gear down + void setGearDown(bool down) { m_gearDown = down; } + + //! Get flaps position in percent + int getFlapsPercent() const { return m_flapsPercentage; } + + //! Set flaps position in percent + void setFlapsPercent(int flapsPercent) { m_flapsPercentage = flapsPercent; } + + //! Are spoilers out? + bool isSpoilersOut() const { return m_spoilersOut; } + + //! Set spoilers out + void setSpoilersOut(bool out) { m_spoilersOut = out; } + + //! Get engines + CAircraftEngineList getEngines() const { return m_engines; } + + //! Engine with number + CAircraftEngine getEngine(int number) const; + + //! Is engine with number on? + bool isEngineOn(int number) const; + + //! Set engines + void setEngines(const CAircraftEngineList &engines) { m_engines = engines; } + + //! Is aircraft on ground? + bool isOnGround() const { return m_isOnGround; } + + //! Set aircraft on ground + void setOnGround(bool onGround) { m_isOnGround = onGround; } + + //! Corresponding callsign + const BlackMisc::Aviation::CCallsign &getCallsign() const { return this->m_correspondingCallsign; } + + //! Corresponding callsign + void setCallsign(const BlackMisc::Aviation::CCallsign &callsign) { this->m_correspondingCallsign = callsign; } + + protected: + //! \copydoc CValueObject::convertToQString + virtual QString convertToQString(bool i18n = false) const override; + + private: + BLACK_ENABLE_TUPLE_CONVERSION(CAircraftParts) + BlackMisc::Aviation::CCallsign m_correspondingCallsign; + CAircraftLights m_lights; + CAircraftEngineList m_engines; + int m_flapsPercentage = 0; + bool m_gearDown = false; + bool m_spoilersOut = false; + bool m_isOnGround = false; + + }; + } // namespace +} // namespace + +// FIXME: Use correct JSON names, when tuple bug is fixed +BLACK_DECLARE_TUPLE_CONVERSION(BlackMisc::Aviation::CAircraftParts, ( + attr(o.m_correspondingCallsign, flags < DisabledForJson > ()), + attr(o.m_lights, "lights"), + attr(o.m_gearDown, "gear_down"), + attr(o.m_flapsPercentage, "flaps_pct"), + attr(o.m_spoilersOut, "spoilers_out"), + attr(o.m_engines, "engines"), + attr(o.m_isOnGround, "on_ground"), + attr(o.m_timestampMSecsSinceEpoch, flags < DisabledForJson | DisabledForComparison > ()) + )) +Q_DECLARE_METATYPE(BlackMisc::Aviation::CAircraftParts) + +#endif // guard diff --git a/src/blackmisc/aviation/aircraftpartslist.cpp b/src/blackmisc/aviation/aircraftpartslist.cpp new file mode 100644 index 000000000..0c7001751 --- /dev/null +++ b/src/blackmisc/aviation/aircraftpartslist.cpp @@ -0,0 +1,49 @@ +/* Copyright (C) 2014 + * swift project Community / Contributors + * + * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level + * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project, + * including this file, may be copied, modified, propagated, or distributed except according to the terms + * contained in the LICENSE file. + */ + +#include "aircraftpartslist.h" + +namespace BlackMisc +{ + namespace Aviation + { + CAircraftPartsList::CAircraftPartsList() { } + + CAircraftPartsList::CAircraftPartsList(const CSequence &other) : + CSequence(other) + { } + + CAircraftPartsList CAircraftPartsList::findBefore(const QDateTime &dateTime) const + { + return findBy([&](const CAircraftParts & parts) + { + return parts.getTimestamp() < dateTime; + }); + } + + void CAircraftPartsList::removeBefore(const QDateTime &dateTime) + { + removeIf([&](const CAircraftParts &parts) + { + return parts.getTimestamp() < dateTime; + }); + } + + void CAircraftPartsList::registerMetadata() + { + qRegisterMetaType>(); + qDBusRegisterMetaType>(); + qRegisterMetaType>(); + qDBusRegisterMetaType>(); + qRegisterMetaType(); + qDBusRegisterMetaType(); + registerMetaValueType(); + } + } // namespace +} // namespace diff --git a/src/blackmisc/aviation/aircraftpartslist.h b/src/blackmisc/aviation/aircraftpartslist.h new file mode 100644 index 000000000..b5b9307b6 --- /dev/null +++ b/src/blackmisc/aviation/aircraftpartslist.h @@ -0,0 +1,57 @@ +/* Copyright (C) 2014 + * swift project Community / Contributors + * + * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level + * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project, + * including this file, may be copied, modified, propagated, or distributed except according to the terms + * contained in the LICENSE file. + */ + +//! \file + +#ifndef BLACKMISC_AIRCRAFTPARTSLIST_H +#define BLACKMISC_AIRCRAFTPARTSLIST_H + +#include "aircraftparts.h" +#include "blackmisc/collection.h" +#include "blackmisc/sequence.h" +#include + +namespace BlackMisc +{ + namespace Aviation + { + //! Value object encapsulating a list of aircraft parts. + class CAircraftPartsList : public CSequence + { + public: + //! Default constructor. + CAircraftPartsList(); + + //! Construct from a base class object. + CAircraftPartsList(const CSequence &other); + + //! Get a list of situations before dateTime + CAircraftPartsList findBefore (const QDateTime& dateTime) const; + + //! Remove parts with timestamp before dateTime + void removeBefore(const QDateTime& dateTime); + + //! \copydoc CValueObject::toQVariant + virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); } + + //! \copydoc CValueObject::convertFromQVariant + virtual void convertFromQVariant(const QVariant &variant) override { BlackMisc::setFromQVariant(this, variant); } + + //! Register metadata + static void registerMetadata(); + }; + + } //namespace +} // namespace + +Q_DECLARE_METATYPE(BlackMisc::Aviation::CAircraftPartsList) +Q_DECLARE_METATYPE(BlackMisc::CCollection) +Q_DECLARE_METATYPE(BlackMisc::CSequence) + +#endif //guard diff --git a/src/blackmisc/blackmisc.pro b/src/blackmisc/blackmisc.pro index fb9954ba7..9c98db800 100644 --- a/src/blackmisc/blackmisc.pro +++ b/src/blackmisc/blackmisc.pro @@ -23,10 +23,13 @@ TRANSLATIONS += translations/blackmisc_i18n_de.ts \ translations/blackmisc_i18n_fr.ts \ translations/blackmisc_i18n_en.ts -HEADERS += *.h -HEADERS += $$PWD/simulation/*.h -SOURCES += *.cpp -SOURCES += $$PWD/simulation/*.cpp +HEADERS += *.h \ + $$PWD/simulation/*.h \ + $$PWD/aviation/*.h \ + +SOURCES += *.cpp \ + $$PWD/simulation/*.cpp \ + $$PWD/aviation/*.cpp \ DESTDIR = ../../lib OTHER_FILES += $$TRANSLATIONS readme.txt diff --git a/src/blackmisc/blackmiscfreefunctions_avmeta.cpp b/src/blackmisc/blackmiscfreefunctions_avmeta.cpp index ad3d8b599..febce07f8 100644 --- a/src/blackmisc/blackmiscfreefunctions_avmeta.cpp +++ b/src/blackmisc/blackmiscfreefunctions_avmeta.cpp @@ -39,4 +39,9 @@ void BlackMisc::Aviation::registerMetadata() CAirportIcao::registerMetadata(); CSelcal::registerMetadata(); CFlightPlan::registerMetadata(); + CAircraftEngine::registerMetadata(); + CAircraftEngineList::registerMetadata(); + CAircraftLights::registerMetadata(); + CAircraftParts::registerMetadata(); + CAircraftPartsList::registerMetadata(); }