mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 05:26:45 +08:00
refs #786, follow up / corresponding adjustments based on context changes
* removed reload models menu item * changed to renamed functions
This commit is contained in:
@@ -103,7 +103,7 @@ namespace BlackGui
|
||||
{
|
||||
if (!this->m_completerOwnModels)
|
||||
{
|
||||
const QStringList modelStrings = sGui->getIContextSimulator()->getInstalledModels().getModelStringList();
|
||||
const QStringList modelStrings = sGui->getIContextSimulator()->getModelSet().getModelStringList();
|
||||
this->m_completerModelSet = new QCompleter(modelStrings, this);
|
||||
setCompleterParameters(this->m_completerModelSet);
|
||||
}
|
||||
@@ -113,7 +113,7 @@ namespace BlackGui
|
||||
{
|
||||
if (!this->m_completerOwnModels)
|
||||
{
|
||||
const QStringList modelStrings = sGui->getIContextSimulator()->getInstalledModels().getModelStringList();
|
||||
const QStringList modelStrings = sGui->getIContextSimulator()->getModelSet().getModelStringList();
|
||||
this->m_completerOwnModels = new QCompleter(modelStrings, this);
|
||||
setCompleterParameters(this->m_completerOwnModels);
|
||||
}
|
||||
|
||||
@@ -201,7 +201,7 @@ namespace BlackGui
|
||||
return;
|
||||
}
|
||||
|
||||
int models = sGui->getIContextSimulator()->getInstalledModelsCount();
|
||||
int models = sGui->getIContextSimulator()->getModelSetCount();
|
||||
bool on = (models > 0);
|
||||
ui->led_MapperReady->setOn(on);
|
||||
if (on)
|
||||
|
||||
@@ -66,6 +66,7 @@ namespace BlackGui
|
||||
ui->tvp_AircraftModels->setAircraftModelMode(CAircraftModelListModel::OwnSimulatorModel);
|
||||
ui->tvp_AircraftModels->setResizeMode(CAircraftModelView::ResizingOff);
|
||||
ui->tvp_AircraftModels->addFilterDialog();
|
||||
ui->tvp_AircraftModels->menuRemoveItems(CViewBaseNonTemplate::MenuBackend);
|
||||
|
||||
ui->tvp_SimulatedAircraft->setAircraftMode(CSimulatedAircraftListModel::ModelMode);
|
||||
ui->tvp_SimulatedAircraft->setResizeMode(CAircraftModelView::ResizingOnce);
|
||||
@@ -73,7 +74,6 @@ namespace BlackGui
|
||||
connect(ui->tvp_AircraftModels, &CAircraftModelView::requestUpdate, this, &CMappingComponent::ps_onModelsUpdateRequested);
|
||||
connect(ui->tvp_AircraftModels, &CAircraftModelView::modelDataChanged, this, &CMappingComponent::ps_onRowCountChanged);
|
||||
connect(ui->tvp_AircraftModels, &CAircraftModelView::clicked, this, &CMappingComponent::ps_onModelSelectedInView);
|
||||
connect(ui->tvp_AircraftModels, &CAircraftModelView::requestNewBackendData, this, &CMappingComponent::ps_onMenuRequestModelReload);
|
||||
|
||||
connect(ui->tvp_SimulatedAircraft, &CSimulatedAircraftView::modelDataChanged, this, &CMappingComponent::ps_onRowCountChanged);
|
||||
connect(ui->tvp_SimulatedAircraft, &CSimulatedAircraftView::clicked, this, &CMappingComponent::ps_onAircraftSelectedInView);
|
||||
@@ -267,7 +267,7 @@ namespace BlackGui
|
||||
bool changed = false;
|
||||
if (aircraftFromBackend.getModelString() != modelString)
|
||||
{
|
||||
CAircraftModelList models = sGui->getIContextSimulator()->getInstalledModelsStartingWith(modelString);
|
||||
CAircraftModelList models = sGui->getIContextSimulator()->getModelSetModelsStartingWith(modelString);
|
||||
if (models.isEmpty())
|
||||
{
|
||||
CLogMessage(this).validationError("No model for title: %1") << modelString;
|
||||
@@ -320,7 +320,7 @@ namespace BlackGui
|
||||
|
||||
void CMappingComponent::ps_onModelsUpdateRequested()
|
||||
{
|
||||
const CAircraftModelList ml(sGui->getIContextSimulator()->getInstalledModels());
|
||||
const CAircraftModelList ml(sGui->getIContextSimulator()->getModelSet());
|
||||
ui->tvp_AircraftModels->updateContainer(ml);
|
||||
}
|
||||
|
||||
@@ -381,15 +381,6 @@ namespace BlackGui
|
||||
}
|
||||
}
|
||||
|
||||
void CMappingComponent::ps_onMenuRequestModelReload()
|
||||
{
|
||||
if (sGui->getIContextSimulator())
|
||||
{
|
||||
sGui->getIContextSimulator()->reloadInstalledModels();
|
||||
CLogMessage(this).info("Requested to reload simulator aircraft models");
|
||||
}
|
||||
}
|
||||
|
||||
CIdentifier CMappingComponent::mappingIdentifier()
|
||||
{
|
||||
if (m_identifier.getName().isEmpty())
|
||||
|
||||
@@ -130,9 +130,6 @@ namespace BlackGui
|
||||
//! Enable / disable aircraft
|
||||
void ps_onMenuEnableAircraft(const BlackMisc::Simulation::CSimulatedAircraft &aircraft);
|
||||
|
||||
//! Reload models
|
||||
void ps_onMenuRequestModelReload();
|
||||
|
||||
//! Highlight in simulator
|
||||
void ps_onMenuHighlightInSimulator(const BlackMisc::Simulation::CSimulatedAircraft &aircraft);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user