mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 17:35:34 +08:00
Ref T242, utility functions for matching
* search among airline aircraft * improved logging information * search among airline ICAO aircraft (which aircraft does the airline use?) * check ecosystem before merging with VATSIM data
This commit is contained in:
@@ -112,6 +112,20 @@ namespace BlackCore
|
||||
return models.findByKey(dbKey);
|
||||
}
|
||||
|
||||
QSet<QString> CModelDataReader::getAircraftDesignatorsForAirline(const CAirlineIcaoCode &code) const
|
||||
{
|
||||
if (!code.hasValidDesignator()) { return QSet<QString>(); }
|
||||
const CAircraftModelList models(this->getModels());
|
||||
return models.getAircraftDesignatorsForAirline(code);
|
||||
}
|
||||
|
||||
CAircraftIcaoCodeList CModelDataReader::getAicraftIcaoCodesForAirline(const CAirlineIcaoCode &code) const
|
||||
{
|
||||
if (!code.hasValidDesignator()) { return CAircraftIcaoCodeList(); }
|
||||
const CAircraftModelList models(this->getModels());
|
||||
return models.getAicraftIcaoCodesForAirline(code);
|
||||
}
|
||||
|
||||
CAircraftModelList CModelDataReader::getModelsForAircraftDesignatorAndLiveryCombinedCode(const QString &aircraftDesignator, const QString &combinedCode)
|
||||
{
|
||||
if (aircraftDesignator.isEmpty()) { return CAircraftModelList(); }
|
||||
@@ -151,9 +165,9 @@ namespace BlackCore
|
||||
return this->getModels().toDbKeySet();
|
||||
}
|
||||
|
||||
QStringList CModelDataReader::getModelStringList() const
|
||||
QStringList CModelDataReader::getModelStringList(bool sort) const
|
||||
{
|
||||
return this->getModels().getModelStringList(false);
|
||||
return this->getModels().getModelStringList(sort);
|
||||
}
|
||||
|
||||
bool CModelDataReader::areAllDataRead() const
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <QReadWriteLock>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QSet>
|
||||
|
||||
class QNetworkReply;
|
||||
|
||||
@@ -87,6 +88,14 @@ namespace BlackCore
|
||||
//! \threadsafe
|
||||
BlackMisc::Simulation::CAircraftModel getModelForDbKey(int dbKey) const;
|
||||
|
||||
//! Get aircraft ICAO designators (e.g. B737, ..) for given airline
|
||||
//! \threadsafe
|
||||
QSet<QString> getAircraftDesignatorsForAirline(const BlackMisc::Aviation::CAirlineIcaoCode &code) const;
|
||||
|
||||
//! Get aircraft ICAO designators (e.g. B737, ..) for given airline
|
||||
//! \threadsafe
|
||||
BlackMisc::Aviation::CAircraftIcaoCodeList getAicraftIcaoCodesForAirline(const BlackMisc::Aviation::CAirlineIcaoCode &code) const;
|
||||
|
||||
//! Get model for designator/combined code
|
||||
//! \threadsafe
|
||||
BlackMisc::Simulation::CAircraftModelList getModelsForAircraftDesignatorAndLiveryCombinedCode(const QString &aircraftDesignator, const QString &combinedCode);
|
||||
@@ -117,7 +126,7 @@ namespace BlackCore
|
||||
|
||||
//! Get model keys
|
||||
//! \threadsafe
|
||||
QStringList getModelStringList() const;
|
||||
QStringList getModelStringList(bool sort = false) const;
|
||||
|
||||
//! All data read?
|
||||
//! \threadsafe
|
||||
|
||||
Reference in New Issue
Block a user