mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-09 21:45:34 +08:00
Removed old model/views for aircraft, now all with simulated aircraft
Updates of models in view now manually / automatic possible Allow to reload models (in backend)
This commit is contained in:
@@ -46,6 +46,7 @@ namespace BlackGui
|
||||
connect(this->ui->tvp_AircraftModels, &CAircraftModelView::requestUpdate, this, &CMappingComponent::ps_onModelsUpdateRequested);
|
||||
connect(this->ui->tvp_AircraftModels, &CAircraftModelView::rowCountChanged, this, &CMappingComponent::ps_onRowCountChanged);
|
||||
connect(this->ui->tvp_AircraftModels, &CAircraftModelView::clicked, this, &CMappingComponent::ps_onModelSelectedInView);
|
||||
connect(this->ui->tvp_AircraftModels, &CAircraftModelView::requestModelReload, this, &CMappingComponent::ps_onMenuRequestModelReload);
|
||||
|
||||
connect(this->ui->tvp_SimulatedAircraft, &CSimulatedAircraftView::rowCountChanged, this, &CMappingComponent::ps_onRowCountChanged);
|
||||
connect(this->ui->tvp_SimulatedAircraft, &CSimulatedAircraftView::clicked, this, &CMappingComponent::ps_onAircraftSelectedInView);
|
||||
@@ -106,7 +107,14 @@ namespace BlackGui
|
||||
|
||||
void CMappingComponent::ps_onAircraftModelsLoaded()
|
||||
{
|
||||
this->ps_onModelsUpdateRequested();
|
||||
if (ui->tvp_AircraftModels->displayAutomatically())
|
||||
{
|
||||
this->ps_onModelsUpdateRequested();
|
||||
}
|
||||
else
|
||||
{
|
||||
CLogMessage(this).info("Models loaded, you can update the model view");
|
||||
}
|
||||
}
|
||||
|
||||
void CMappingComponent::ps_onModelMatchingCompleted(const BlackMisc::Simulation::CSimulatedAircraft &aircraft)
|
||||
@@ -339,6 +347,15 @@ namespace BlackGui
|
||||
}
|
||||
}
|
||||
|
||||
void CMappingComponent::ps_onMenuRequestModelReload()
|
||||
{
|
||||
if (this->getIContextSimulator())
|
||||
{
|
||||
this->getIContextSimulator()->reloadInstalledModels();
|
||||
CLogMessage(this).info("Requested to reload simulator aircraft models");
|
||||
}
|
||||
}
|
||||
|
||||
const QString &CMappingComponent::mappingtOriginator()
|
||||
{
|
||||
// string is generated once, the timestamp allows to use multiple
|
||||
|
||||
@@ -109,6 +109,9 @@ namespace BlackGui
|
||||
//! Enable / disable aircraft
|
||||
void ps_onMenuEnableAircraft(const BlackMisc::Simulation::CSimulatedAircraft &aircraft);
|
||||
|
||||
//! Reload models
|
||||
void ps_onMenuRequestModelReload();
|
||||
|
||||
private:
|
||||
static const QString &mappingtOriginator();
|
||||
void updateSimulatedAircraftView();
|
||||
|
||||
Reference in New Issue
Block a user