mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 08:36:52 +08:00
Ref T226, airport completer
* a bigger one with name * same as dialog * smaller one, using the dialog
This commit is contained in:
@@ -83,18 +83,37 @@ namespace BlackMisc
|
||||
QStringList icaos;
|
||||
for (const CAirport &airport : *this)
|
||||
{
|
||||
if (!airport.getIcaoAsString().isEmpty())
|
||||
{
|
||||
icaos.push_back(airport.getIcaoAsString());
|
||||
}
|
||||
}
|
||||
if (sorted)
|
||||
{
|
||||
icaos.sort();
|
||||
if (airport.getIcaoAsString().isEmpty()) { continue; }
|
||||
icaos.push_back(airport.getIcaoAsString());
|
||||
}
|
||||
if (sorted) { icaos.sort(); }
|
||||
return icaos;
|
||||
}
|
||||
|
||||
QStringList CAirportList::allDescriptivesNames(bool sorted) const
|
||||
{
|
||||
QStringList names;
|
||||
for (const CAirport &airport : *this)
|
||||
{
|
||||
if (airport.getDescriptiveName().isEmpty()) { continue; }
|
||||
names.push_back(airport.getDescriptiveName());
|
||||
}
|
||||
if (sorted) { names.sort(); }
|
||||
return names;
|
||||
}
|
||||
|
||||
QStringList CAirportList::allLocations(bool sorted) const
|
||||
{
|
||||
QStringList locations;
|
||||
for (const CAirport &airport : *this)
|
||||
{
|
||||
if (airport.getLocation().isEmpty()) { continue; }
|
||||
locations.push_back(airport.getLocation());
|
||||
}
|
||||
if (sorted) { locations.sort(); }
|
||||
return locations;
|
||||
}
|
||||
|
||||
CAirportList CAirportList::fromDatabaseJson(const QJsonArray &array, CAirportList *inconsistent)
|
||||
{
|
||||
CAirportList airports;
|
||||
|
||||
Reference in New Issue
Block a user