mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-16 02:06:08 +08:00
refs #632, fixed CAircraftCfgEntries ColumnIndex functions
This commit is contained in:
@@ -157,24 +157,21 @@ namespace BlackMisc
|
|||||||
ColumnIndex i = index.frontCasted<ColumnIndex>();
|
ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||||
switch (i)
|
switch (i)
|
||||||
{
|
{
|
||||||
case IndexFileName:
|
case IndexEntryIndex: return CVariant::from(this->m_index);
|
||||||
return CVariant::from(this->m_fileName);
|
case IndexFileName: return CVariant::from(this->m_fileName);
|
||||||
case IndexTitle:
|
case IndexTitle: return CVariant::from(this->m_title);
|
||||||
return CVariant::from(this->m_title);
|
case IndexAirline: return CVariant::from(this->m_atcAirline);
|
||||||
case IndexAtcType:
|
case IndexAtcType: return CVariant::from(this->m_atcType);
|
||||||
return CVariant::from(this->m_atcType);
|
case IndexAtcModel: return CVariant::from(this->m_atcModel);
|
||||||
case IndexAtcModel:
|
case IndexParkingCode: return CVariant::from(this->m_atcParkingCode);
|
||||||
return CVariant::from(this->m_atcModel);
|
case IndexDescription: return CVariant::from(this->m_description);
|
||||||
case IndexParkingCode:
|
case IndexUiType: return CVariant::from(this->m_uiType);
|
||||||
return CVariant::from(this->m_atcParkingCode);
|
case IndexUiManufacturer: return CVariant::from(this->m_uiManufacturer);
|
||||||
case IndexEntryIndex:
|
case IndexTexture: return CVariant::from(this->m_texture);
|
||||||
return CVariant::from(this->m_index);
|
case IndexSimulatorName: return CVariant::from(this->m_simName);
|
||||||
case IndexTexture:
|
case IndexCreatedBy: return CVariant::from(this->m_createdBy);
|
||||||
return CVariant::from(this->m_texture);
|
case IndexRotorcraft: return CVariant::from(this->m_rotorcraft);
|
||||||
case IndexDescription:
|
default: return CValueObject::propertyByIndex(index);
|
||||||
return CVariant::from(this->m_description);
|
|
||||||
default:
|
|
||||||
return CValueObject::propertyByIndex(index);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -185,30 +182,20 @@ namespace BlackMisc
|
|||||||
ColumnIndex i = index.frontCasted<ColumnIndex>();
|
ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||||
switch (i)
|
switch (i)
|
||||||
{
|
{
|
||||||
case IndexAtcModel:
|
case IndexEntryIndex: this->setIndex(variant.toInt()); break;
|
||||||
this->setAtcModel(variant.toQString());
|
case IndexFileName: this->setFileName(variant.toQString()); break;
|
||||||
break;
|
case IndexTitle: this->setTitle(variant.toQString()); break;
|
||||||
case IndexAtcType:
|
case IndexAirline: this->setTitle(this->m_atcAirline); break;
|
||||||
this->setAtcType(variant.toQString());
|
case IndexAtcType: this->setAtcType(variant.toQString()); break;
|
||||||
break;
|
case IndexAtcModel: this->setAtcModel(variant.toQString()); break;
|
||||||
case IndexEntryIndex:
|
case IndexParkingCode: this->setAtcParkingCode(variant.toQString()); break;
|
||||||
this->setIndex(variant.toInt());
|
case IndexDescription: this->setDescription(variant.toQString()); break;
|
||||||
break;
|
case IndexUiType: this->setUiType(variant.toQString()); break;
|
||||||
case IndexFileName:
|
case IndexUiManufacturer: this->setUiManufacturer(variant.toQString()); break;
|
||||||
this->setFileName(variant.toQString());
|
case IndexTexture: this->setTexture(variant.toQString()); break;
|
||||||
break;
|
case IndexSimulatorName: this->setSimName(variant.toQString()); break;
|
||||||
case IndexParkingCode:
|
case IndexCreatedBy: this->setCreatedBy(variant.toQString()); break;
|
||||||
this->setAtcParkingCode(variant.toQString());
|
case IndexRotorcraft: this->setRotorcraft(variant.toBool()); break;
|
||||||
break;
|
|
||||||
case IndexTitle:
|
|
||||||
this->setTitle(variant.toQString());
|
|
||||||
break;
|
|
||||||
case IndexDescription:
|
|
||||||
this->setDescription(variant.toQString());
|
|
||||||
break;
|
|
||||||
case IndexTexture:
|
|
||||||
this->setTexture(variant.toQString());
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
CValueObject::setPropertyByIndex(variant, index);
|
CValueObject::setPropertyByIndex(variant, index);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -39,11 +39,17 @@ namespace BlackMisc
|
|||||||
IndexEntryIndex = BlackMisc::CPropertyIndex::GlobalIndexCAircraftCfgEntries,
|
IndexEntryIndex = BlackMisc::CPropertyIndex::GlobalIndexCAircraftCfgEntries,
|
||||||
IndexFileName,
|
IndexFileName,
|
||||||
IndexTitle,
|
IndexTitle,
|
||||||
|
IndexAirline,
|
||||||
IndexAtcType,
|
IndexAtcType,
|
||||||
IndexAtcModel,
|
IndexAtcModel,
|
||||||
IndexParkingCode,
|
IndexParkingCode,
|
||||||
IndexDescription,
|
IndexDescription,
|
||||||
IndexTexture
|
IndexUiType,
|
||||||
|
IndexUiManufacturer,
|
||||||
|
IndexTexture,
|
||||||
|
IndexSimulatorName,
|
||||||
|
IndexCreatedBy,
|
||||||
|
IndexRotorcraft
|
||||||
};
|
};
|
||||||
|
|
||||||
//! Default constructor
|
//! Default constructor
|
||||||
|
|||||||
Reference in New Issue
Block a user