mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 01:45:38 +08:00
Ref T312, added checkImpl/check in simulator listeners
This commit is contained in:
@@ -342,7 +342,7 @@ namespace BlackSimPlugin
|
||||
|
||||
void CSimulatorEmulated::onSettingsChanged()
|
||||
{
|
||||
const CSwiftPluginSettings settings(m_settings.get());
|
||||
const CSwiftPluginSettings settings(m_pluginSettings.get());
|
||||
m_log = settings.isLoggingFunctionCalls();
|
||||
|
||||
const CSimulatorInfo simulator = settings.getEmulatedSimulator();
|
||||
@@ -446,7 +446,7 @@ namespace BlackSimPlugin
|
||||
const QPointer<CSimulatorEmulatedListener> guard(this);
|
||||
QTimer::singleShot(2000, this, [ = ]
|
||||
{
|
||||
if (guard.isNull()) { return; }
|
||||
if (!guard) { return; }
|
||||
Q_ASSERT_X(this->getPluginInfo().isValid(), Q_FUNC_INFO, "Invalid plugin");
|
||||
emit this->simulatorStarted(this->getPluginInfo());
|
||||
});
|
||||
@@ -454,5 +454,10 @@ namespace BlackSimPlugin
|
||||
|
||||
void CSimulatorEmulatedListener::stopImpl()
|
||||
{ }
|
||||
|
||||
void CSimulatorEmulatedListener::checkImpl()
|
||||
{
|
||||
this->startImpl();
|
||||
}
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
@@ -168,7 +168,7 @@ namespace BlackSimPlugin
|
||||
BlackMisc::Simulation::CSimulatedAircraftList m_renderedAircraft; //!< represents remote aircraft in simulator
|
||||
QScopedPointer<CSimulatorEmulatedMonitorDialog> m_monitorWidget; //!< parent will be main window, so we need to destroy widget when destroyed
|
||||
BlackMisc::CConnectionGuard m_connectionGuard; //!< connected with provider
|
||||
BlackMisc::CSettingReadOnly<BlackMisc::Simulation::Settings::TSwiftPlugin> m_settings { this, &CSimulatorEmulated::onSettingsChanged };
|
||||
BlackMisc::CSettingReadOnly<BlackMisc::Simulation::Settings::TSwiftPlugin> m_pluginSettings { this, &CSimulatorEmulated::onSettingsChanged };
|
||||
QMap<BlackMisc::Aviation::CCallsign, BlackMisc::Simulation::CInterpolatorMultiWrapper> m_interpolators; //!< interpolators per callsign
|
||||
};
|
||||
|
||||
@@ -187,6 +187,9 @@ namespace BlackSimPlugin
|
||||
|
||||
//! \copydoc BlackCore::ISimulatorListener::stopImpl
|
||||
virtual void stopImpl() override;
|
||||
|
||||
//! \copydoc BlackCore::ISimulatorListener::stopImpl
|
||||
virtual void checkImpl() override;
|
||||
};
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
Reference in New Issue
Block a user