mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
refs #535, updated aircraft model / view
* add functions to apply changes to selected objects * allow to highlight models by their model strings * Utility function to show which parts come from DB * model strings can be obtained sorted/unsorted
This commit is contained in:
@@ -138,16 +138,40 @@ namespace BlackMisc
|
||||
});
|
||||
}
|
||||
|
||||
QStringList CAircraftModelList::getSortedModelStrings() const
|
||||
QStringList CAircraftModelList::getModelStrings(bool sort) const
|
||||
{
|
||||
QStringList ms;
|
||||
for (const CAircraftModel &model : (*this))
|
||||
{
|
||||
ms.append(model.getModelString());
|
||||
}
|
||||
ms.sort(Qt::CaseInsensitive);
|
||||
if (sort) { ms.sort(Qt::CaseInsensitive); }
|
||||
return ms;
|
||||
}
|
||||
|
||||
void CAircraftModelList::updateDistributor(const CDistributor &distributor)
|
||||
{
|
||||
for (CAircraftModel &model : *this)
|
||||
{
|
||||
model.setDistributor(distributor);
|
||||
}
|
||||
}
|
||||
|
||||
void CAircraftModelList::updateAircraftIcao(const CAircraftIcaoCode &icao)
|
||||
{
|
||||
for (CAircraftModel &model : *this)
|
||||
{
|
||||
model.setAircraftIcaoCode(icao);
|
||||
}
|
||||
}
|
||||
|
||||
void CAircraftModelList::updateLivery(const CLivery &livery)
|
||||
{
|
||||
for (CAircraftModel &model : *this)
|
||||
{
|
||||
model.setLivery(livery);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user