refs #395, changed own aircraft provider to thread safe member functions

(similar to remote aircraft provider)
* removed references
* made own aircraft context thread safe (reg. own aircrat data)
* removed the read only versions of the provider
* adjusted consuming methods
* renamed some functions ("ownAircraft...") to avoid ambiguity (with remote aircraft)
This commit is contained in:
Klaus Basan
2015-04-26 16:41:48 +02:00
committed by Mathew Sutcliffe
parent 7200f2e29c
commit 3ecf37dda4
27 changed files with 505 additions and 335 deletions

View File

@@ -77,20 +77,20 @@ namespace BlackSimPlugin
void CSimulatorFsCommon::setOwnAircraftModel(const QString &modelName)
{
CAircraftModel model = ownAircraft().getModel();
CAircraftModel model = getOwnAircraftModel();
model.setModelString(modelName);
this->setOwnAircraftModel(model);
}
void CSimulatorFsCommon::setOwnAircraftModel(const BlackMisc::Simulation::CAircraftModel &model)
{
if (ownAircraft().getModel() != model)
if (getOwnAircraftModel() != model)
{
CAircraftModel newModel(model);
newModel.setModelType(CAircraftModel::TypeOwnSimulatorModel);
CSimulatorFsCommon::reverseLookupIcaoData(newModel);
ownAircraft().setModel(newModel);
emit ownAircraftModelChanged(ownAircraft());
updateOwnModel(newModel);
emit ownAircraftModelChanged(getOwnAircraft());
}
}