refs #638, refs #614, support for military flag and swift livery string

* fixed missing tuple attribute
* improved toQString conversion
This commit is contained in:
Klaus Basan
2016-04-11 19:37:57 +02:00
parent d9e550beef
commit 826662cbb5
5 changed files with 69 additions and 3 deletions

View File

@@ -262,6 +262,7 @@ namespace BlackMisc
if (!this->hasIataCode()) { return ""; }
QString s(getIataCode());
s = s.append(" [IATA]");
if (hasDesignator()) { s.append(" ").append(getDesignator()); }
if (hasManufacturer()) { s = s.append(" ").append(getManufacturer()); }
if (hasModelDescription()) { s = s.append(" ").append(getModelDescription()); }
return s.append(" ").append(getDbKeyAsStringInParentheses());
@@ -272,8 +273,9 @@ namespace BlackMisc
if (!this->hasFamily()) { return ""; }
QString s(getFamily());
s = s.append(" [family]");
if (hasManufacturer()) { s = s.append(" ").append(getManufacturer()); }
if (hasModelDescription()) { s = s.append(" ").append(getModelDescription()); }
if (hasDesignator()) { s.append(" ").append(getDesignator()); }
if (hasManufacturer()) { s.append(" ").append(getManufacturer()); }
if (hasModelDescription()) { s.append(" ").append(getModelDescription()); }
return s.append(" ").append(getDbKeyAsStringInParentheses());
}

View File

@@ -126,6 +126,11 @@ namespace BlackMisc
QString s(this->m_designator);
if (this->m_name.isEmpty()) { return ""; }
if (!this->m_name.isEmpty()) { s.append(" (").append(this->m_name).append(")"); }
s.append(" Op: ").append(boolToYesNo(this->isOperating()));
s.append(" VA: ").append(boolToYesNo(this->isVirtualAirline()));
s.append(" Mil: ").append(boolToYesNo(this->isMilitary()));
return s;
}

View File

@@ -176,7 +176,8 @@ namespace BlackMisc
BLACK_METAMEMBER(combinedCode, 0, CaseInsensitiveComparison),
BLACK_METAMEMBER(description),
BLACK_METAMEMBER(colorFuselage),
BLACK_METAMEMBER(colorTail)
BLACK_METAMEMBER(colorTail),
BLACK_METAMEMBER(military)
);
};
} // namespace