mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 15:45:46 +08:00
refs #568, improved validation and handling
* invalid models can be highlighted on stash * selection mode can be toggled between single/multi selection (where applicable) * color for highlighting can be set * finetuning of menus
This commit is contained in:
@@ -90,6 +90,14 @@ namespace BlackMisc
|
||||
return QJsonDocument(toDatabaseJson()).toJson(format);
|
||||
}
|
||||
|
||||
bool CAircraftModel::canInitializeFromFsd() const
|
||||
{
|
||||
bool nw = this->getModelType() == CAircraftModel::TypeQueriedFromNetwork ||
|
||||
this->getModelType() == CAircraftModel::TypeFsdData ||
|
||||
this->getModelType() == CAircraftModel::TypeUnknown;
|
||||
return nw;
|
||||
}
|
||||
|
||||
CVariant CAircraftModel::propertyByIndex(const BlackMisc::CPropertyIndex &index) const
|
||||
{
|
||||
if (index.isMyself()) { return CVariant::from(*this); }
|
||||
@@ -179,14 +187,6 @@ namespace BlackMisc
|
||||
}
|
||||
}
|
||||
|
||||
bool CAircraftModel::canInitializeFromFsd() const
|
||||
{
|
||||
bool nw = this->getModelType() == CAircraftModel::TypeQueriedFromNetwork ||
|
||||
this->getModelType() == CAircraftModel::TypeFsdData ||
|
||||
this->getModelType() == CAircraftModel::TypeUnknown;
|
||||
return nw;
|
||||
}
|
||||
|
||||
int CAircraftModel::comparePropertyByIndex(const CAircraftModel &compareValue, const CPropertyIndex &index) const
|
||||
{
|
||||
if (IDatastoreObjectWithIntegerKey::canHandleIndex(index)) { return IDatastoreObjectWithIntegerKey::comparePropertyByIndex(compareValue, index);}
|
||||
@@ -204,6 +204,7 @@ namespace BlackMisc
|
||||
return this->m_distributor.comparePropertyByIndex(compareValue.getDistributor(), index.copyFrontRemoved());
|
||||
case IndexDescription:
|
||||
return this->m_description.compare(compareValue.getDescription(), Qt::CaseInsensitive);
|
||||
case IndexSimulatorInfoAsString:
|
||||
case IndexSimulatorInfo:
|
||||
return this->m_simulator.comparePropertyByIndex(compareValue.getSimulatorInfo(), index.copyFrontRemoved());
|
||||
case IndexName:
|
||||
|
||||
Reference in New Issue
Block a user