mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-23 22:15:37 +08:00
refs #396 subfolders and renamed callsign list to callsign set
* subfolder audio * subfolder geo * adjusted samples, tests ....
This commit is contained in:
committed by
Roland Winklmeier
parent
32f60722c8
commit
0ab755d510
@@ -13,9 +13,9 @@
|
||||
#define BLACKMISC_AVIATION_AIRCRAFTLIST_H
|
||||
|
||||
#include "blackmisc/aviation/aircraft.h"
|
||||
#include "blackmisc/aviation/callsignlist.h"
|
||||
#include "blackmisc/aviation/callsignset.h"
|
||||
#include "blackmisc/aviation/callsignobjectlist.h"
|
||||
#include "blackmisc/geoobjectlist.h"
|
||||
#include "blackmisc/geo/geoobjectlist.h"
|
||||
#include "blackmisc/nwuserlist.h"
|
||||
#include "blackmisc/collection.h"
|
||||
#include "blackmisc/propertyindexvariantmap.h"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#ifndef BLACKMISC_AVIATION_AIRCRAFTSITUATION_H
|
||||
#define BLACKMISC_AVIATION_AIRCRAFTSITUATION_H
|
||||
|
||||
#include "blackmisc/coordinategeodetic.h"
|
||||
#include "blackmisc/geo/coordinategeodetic.h"
|
||||
#include "blackmisc/timestampbased.h"
|
||||
#include "blackmisc/aviation/altitude.h"
|
||||
#include "blackmisc/aviation/heading.h"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define BLACKMISC_AVIATION_AIRPORT_H
|
||||
|
||||
#include "blackmisc/aviation/airporticao.h"
|
||||
#include "blackmisc/coordinategeodetic.h"
|
||||
#include "blackmisc/geo/coordinategeodetic.h"
|
||||
#include "blackmisc/propertyindex.h"
|
||||
|
||||
namespace BlackMisc
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
#define BLACKMISC_AVIATION_AIRPORTLIST_H
|
||||
|
||||
#include "blackmisc/aviation/airport.h"
|
||||
#include "blackmisc/geoobjectlist.h"
|
||||
#include "blackmisc/geo/geoobjectlist.h"
|
||||
#include "blackmisc/collection.h"
|
||||
#include "blackmisc/sequence.h"
|
||||
#include "blackmisc/geoobjectlist.h"
|
||||
#include "blackmisc/geo/geoobjectlist.h"
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QList>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include "blackmisc/aviation/atcstation.h"
|
||||
#include "blackmisc/aviation/comsystem.h"
|
||||
#include "blackmisc/voiceroom.h"
|
||||
#include "blackmisc/audio/voiceroom.h"
|
||||
#include "blackmisc/icon.h"
|
||||
#include "blackmisc/propertyindex.h"
|
||||
#include "blackmisc/blackmiscfreefunctions.h"
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
#ifndef BLACKMISC_AVIATION_ATCSTATION_H
|
||||
#define BLACKMISC_AVIATION_ATCSTATION_H
|
||||
|
||||
#include "blackmisc/voiceroom.h"
|
||||
#include "blackmisc/audio/voiceroom.h"
|
||||
#include "blackmisc/aviation/comsystem.h"
|
||||
#include "blackmisc/aviation/informationmessage.h"
|
||||
#include "blackmisc/aviation/callsign.h"
|
||||
#include "blackmisc/nwuser.h"
|
||||
#include "blackmisc/coordinategeodetic.h"
|
||||
#include "blackmisc/geo/coordinategeodetic.h"
|
||||
#include "blackmisc/pqfrequency.h"
|
||||
#include "blackmisc/pqlength.h"
|
||||
#include "blackmisc/pqtime.h"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#ifndef BLACKMISC_AVIATION_ATCSTATIONLIST_H
|
||||
#define BLACKMISC_AVIATION_ATCSTATIONLIST_H
|
||||
|
||||
#include "blackmisc/geoobjectlist.h"
|
||||
#include "blackmisc/geo/geoobjectlist.h"
|
||||
#include "blackmisc/nwuserlist.h"
|
||||
#include "blackmisc/aviation/atcstation.h"
|
||||
#include "blackmisc/aviation/callsignobjectlist.h"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "blackmisc/aviation/transponder.h"
|
||||
#include "blackmisc/aviation/track.h"
|
||||
#include "blackmisc/aviation/callsign.h"
|
||||
#include "blackmisc/aviation/callsignlist.h"
|
||||
#include "blackmisc/aviation/callsignset.h"
|
||||
#include "blackmisc/aviation/atcstation.h"
|
||||
#include "blackmisc/aviation/atcstationlist.h"
|
||||
#include "blackmisc/aviation/aircraftlist.h"
|
||||
|
||||
@@ -27,7 +27,7 @@ void BlackMisc::Aviation::registerMetadata()
|
||||
CTrack::registerMetadata();
|
||||
CInformationMessage::registerMetadata();
|
||||
CCallsign::registerMetadata();
|
||||
CCallsignList::registerMetadata();
|
||||
CCallsignSet::registerMetadata();
|
||||
CAtcStation::registerMetadata();
|
||||
CAtcStationList::registerMetadata();
|
||||
CAircraft::registerMetadata();
|
||||
|
||||
@@ -37,9 +37,9 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
template <class OBJ, class CONTAINER>
|
||||
CCallsignList ICallsignObjectList<OBJ, CONTAINER>::getCallsigns() const
|
||||
CCallsignSet ICallsignObjectList<OBJ, CONTAINER>::getCallsigns() const
|
||||
{
|
||||
CCallsignList cs;
|
||||
CCallsignSet cs;
|
||||
for (const OBJ &obj : this->container())
|
||||
{
|
||||
cs.push_back(obj.getCallsign());
|
||||
@@ -54,7 +54,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
template <class OBJ, class CONTAINER>
|
||||
CONTAINER ICallsignObjectList<OBJ, CONTAINER>::findByCallsigns(const CCallsignList &callsigns) const
|
||||
CONTAINER ICallsignObjectList<OBJ, CONTAINER>::findByCallsigns(const CCallsignSet &callsigns) const
|
||||
{
|
||||
return this->container().findBy(Predicates::MemberIsAnyOf(&OBJ::getCallsign, callsigns));
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#include "blackmisc/collection.h"
|
||||
#include "blackmisc/sequence.h"
|
||||
#include "blackmisc/aviation/callsignlist.h"
|
||||
#include "blackmisc/aviation/callsignset.h"
|
||||
#include "blackmisc/propertyindexlist.h"
|
||||
#include "blackmisc/propertyindexvariantmap.h"
|
||||
#include <QList>
|
||||
@@ -37,13 +37,13 @@ namespace BlackMisc
|
||||
int applyIfCallsign(const BlackMisc::Aviation::CCallsign &callsign, const BlackMisc::CPropertyIndexVariantMap &variantMap);
|
||||
|
||||
//! All callsigns
|
||||
BlackMisc::Aviation::CCallsignList getCallsigns() const;
|
||||
BlackMisc::Aviation::CCallsignSet getCallsigns() const;
|
||||
|
||||
//! Find 0..n stations by callsign
|
||||
CONTAINER findByCallsign(const CCallsign &callsign) const;
|
||||
|
||||
//! Find 0..n aircraft matching any of a set of callsigns
|
||||
CONTAINER findByCallsigns(const CCallsignList &callsigns) const;
|
||||
CONTAINER findByCallsigns(const CCallsignSet &callsigns) const;
|
||||
|
||||
//! Find the first aircraft by callsign, if none return given one
|
||||
OBJ findFirstByCallsign(const CCallsign &callsign, const OBJ &ifNotFound = {}) const;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackmisc/aviation/callsignlist.h"
|
||||
#include "blackmisc/aviation/callsignset.h"
|
||||
#include "blackmisc/predicates.h"
|
||||
|
||||
namespace BlackMisc
|
||||
@@ -15,21 +15,21 @@ namespace BlackMisc
|
||||
namespace Aviation
|
||||
{
|
||||
|
||||
CCallsignList::CCallsignList() { }
|
||||
CCallsignSet::CCallsignSet() { }
|
||||
|
||||
CCallsignList::CCallsignList(const CCollection<CCallsign> &other) :
|
||||
CCallsignSet::CCallsignSet(const CCollection<CCallsign> &other) :
|
||||
CCollection<CCallsign>(other)
|
||||
{ }
|
||||
|
||||
void CCallsignList::registerMetadata()
|
||||
void CCallsignSet::registerMetadata()
|
||||
{
|
||||
qRegisterMetaType<BlackMisc::CSequence<CCallsign>>();
|
||||
qDBusRegisterMetaType<BlackMisc::CSequence<CCallsign>>();
|
||||
qRegisterMetaType<BlackMisc::CCollection<CCallsign>>();
|
||||
qDBusRegisterMetaType<BlackMisc::CCollection<CCallsign>>();
|
||||
qRegisterMetaType<CCallsignList>();
|
||||
qDBusRegisterMetaType<CCallsignList>();
|
||||
registerMetaValueType<CCallsignList>();
|
||||
qRegisterMetaType<CCallsignSet>();
|
||||
qDBusRegisterMetaType<CCallsignSet>();
|
||||
registerMetaValueType<CCallsignSet>();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@@ -9,8 +9,8 @@
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKMISC_AVIATION_CALLSIGNLIST_H
|
||||
#define BLACKMISC_AVIATION_CALLSIGNLIST_H
|
||||
#ifndef BLACKMISC_AVIATION_CALLSIGNSET_H
|
||||
#define BLACKMISC_AVIATION_CALLSIGNSET_H
|
||||
|
||||
#include "blackmisc/aviation/callsign.h"
|
||||
#include "blackmisc/collection.h"
|
||||
@@ -21,15 +21,15 @@ namespace BlackMisc
|
||||
{
|
||||
namespace Aviation
|
||||
{
|
||||
//! Value object for a list of callsigns.
|
||||
class CCallsignList : public CCollection<CCallsign>
|
||||
//! Value object for a set of callsigns.
|
||||
class CCallsignSet : public CCollection<CCallsign>
|
||||
{
|
||||
public:
|
||||
//! Default constructor.
|
||||
CCallsignList();
|
||||
CCallsignSet();
|
||||
|
||||
//! Construct from a base class object.
|
||||
CCallsignList(const CCollection<CCallsign> &other);
|
||||
CCallsignSet(const CCollection<CCallsign> &other);
|
||||
|
||||
//! \copydoc CValueObject::toQVariant
|
||||
virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); }
|
||||
@@ -44,7 +44,7 @@ namespace BlackMisc
|
||||
} //namespace
|
||||
} // namespace
|
||||
|
||||
Q_DECLARE_METATYPE(BlackMisc::Aviation::CCallsignList)
|
||||
Q_DECLARE_METATYPE(BlackMisc::Aviation::CCallsignSet)
|
||||
Q_DECLARE_METATYPE(BlackMisc::CCollection<BlackMisc::Aviation::CCallsign>)
|
||||
Q_DECLARE_METATYPE(BlackMisc::CSequence<BlackMisc::Aviation::CCallsign>)
|
||||
|
||||
Reference in New Issue
Block a user