mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-12 23:35:33 +08:00
Login component style
This commit is contained in:
@@ -133,7 +133,7 @@ namespace BlackGui
|
|||||||
|
|
||||||
if (sGui && sGui->getIContextSimulator())
|
if (sGui && sGui->getIContextSimulator())
|
||||||
{
|
{
|
||||||
connect(sGui->getIContextSimulator(), &IContextSimulator::ownAircraftModelChanged, this, &CLoginComponent::simulatorModelChanged);
|
connect(sGui->getIContextSimulator(), &IContextSimulator::ownAircraftModelChanged, this, &CLoginComponent::onSimulatorModelChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
// server and UI elements when in disconnect state
|
// server and UI elements when in disconnect state
|
||||||
@@ -587,18 +587,19 @@ namespace BlackGui
|
|||||||
{
|
{
|
||||||
if (!sGui->getIContextSimulator()->isSimulatorAvailable()) { return; }
|
if (!sGui->getIContextSimulator()->isSimulatorAvailable()) { return; }
|
||||||
const CAircraftModel model(sGui->getIContextOwnAircraft()->getOwnAircraft().getModel());
|
const CAircraftModel model(sGui->getIContextOwnAircraft()->getOwnAircraft().getModel());
|
||||||
this->simulatorModelChanged(model);
|
this->onSimulatorModelChanged(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CLoginComponent::simulatorModelChanged(const CAircraftModel &model)
|
void CLoginComponent::onSimulatorModelChanged(const CAircraftModel &model)
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(sGui && sGui->getIContextNetwork(), Q_FUNC_INFO, "Missing context");
|
if (!sGui || !sGui->getIContextNetwork() || sApp->isShuttingDown()) { return; }
|
||||||
const bool isNetworkConnected = sGui && sGui->getIContextNetwork()->isConnected();
|
const bool isNetworkConnected = sGui && sGui->getIContextNetwork()->isConnected();
|
||||||
if (isNetworkConnected) { return; }
|
if (isNetworkConnected) { return; }
|
||||||
const QString modelStr(model.hasModelString() ? model.getModelString() : "<unknown>");
|
const QString modelStr(model.hasModelString() ? model.getModelString() : "<unknown>");
|
||||||
if (!model.hasModelString())
|
if (!model.hasModelString())
|
||||||
{
|
{
|
||||||
CLogMessage(this).validationInfo("Invalid lookup for '%1' successful: %2") << modelStr << model.toQString();
|
CLogMessage(this).validationInfo("Invalid lookup for '%1' successful: %2") << modelStr << model.toQString();
|
||||||
|
CLogMessage(this).validationInfo("Hint: Are you using the emulated driver? Set a model if so!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this->setOwnModelAndIcaoValues();
|
this->setOwnModelAndIcaoValues();
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ namespace BlackGui
|
|||||||
void reverseLookupAircraftModel();
|
void reverseLookupAircraftModel();
|
||||||
|
|
||||||
//! Simulator model has been changed
|
//! Simulator model has been changed
|
||||||
void simulatorModelChanged(const BlackMisc::Simulation::CAircraftModel &model);
|
void onSimulatorModelChanged(const BlackMisc::Simulation::CAircraftModel &model);
|
||||||
|
|
||||||
//! Launch mapping wizard
|
//! Launch mapping wizard
|
||||||
void mappingWizard();
|
void mappingWizard();
|
||||||
|
|||||||
Reference in New Issue
Block a user