mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-25 02:05:43 +08:00
Ref T524, filter by combined type/manufacturer
This commit is contained in:
committed by
Mat Sutcliffe
parent
df19d74b39
commit
509a60d06f
@@ -371,7 +371,7 @@ namespace BlackMisc
|
||||
const bool wildcard = cc.contains('*');
|
||||
if (!wildcard) { return false; }
|
||||
const QChar at = cc.at(0);
|
||||
const QChar c = cc.at(1);
|
||||
const QChar c = cc.at(1);
|
||||
const QChar et = cc.at(2);
|
||||
if (at != '*')
|
||||
{
|
||||
@@ -387,6 +387,12 @@ namespace BlackMisc
|
||||
return cet.length() == 1 && cet.at(0) == et;
|
||||
}
|
||||
|
||||
bool CAircraftIcaoCode::matchesCombinedTypeAndManufacturer(const QString &combinedType, const QString &manufacturer) const
|
||||
{
|
||||
return this->matchesCombinedType(combinedType) &&
|
||||
this->matchesManufacturer(manufacturer);
|
||||
}
|
||||
|
||||
QString CAircraftIcaoCode::getDesignatorManufacturer() const
|
||||
{
|
||||
return (this->hasDesignator() ? this->getDesignator() : QStringLiteral("????")) %
|
||||
|
||||
@@ -166,6 +166,9 @@ namespace BlackMisc
|
||||
//! \remark * can be used as wildcard, e.g. L*J, L**
|
||||
bool matchesCombinedType(const QString &combinedType) const;
|
||||
|
||||
//! Matches combined type and
|
||||
bool matchesCombinedTypeAndManufacturer(const QString &combinedType, const QString &manufacturer) const;
|
||||
|
||||
//! Set the model description (ICAO description)
|
||||
void setModelDescription(const QString &modelDescription) { m_modelDescription = modelDescription.trimmed(); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user