[AFV] Simulator settings changed signal

* in the cockpit "sync." can now be enabled/disabled
* settings signal allows to update UI in settings UI
This commit is contained in:
Klaus Basan
2020-04-14 15:39:41 +02:00
committed by Mat Sutcliffe
parent e839820940
commit 21e109e5e2
6 changed files with 205 additions and 181 deletions

View File

@@ -114,6 +114,9 @@ namespace BlackCore
//! Same as simulatorPluginChanged, only with simulator signature
void simulatorChanged(const BlackMisc::Simulation::CSimulatorInfo &simulator);
//! Simulator settings have been changed
void simulatorSettingsChanged();
//! A formerly vital driver is no longer vital/responding
void vitalityLost();

View File

@@ -169,6 +169,7 @@ namespace BlackCore
if (simSettings == settings) { return false; }
const CStatusMessage msg = m_multiSimulatorSettings.setSettings(settings, simulator);
CLogMessage::preformatted(msg);
emit this->simulatorSettingsChanged();
return true;
}

View File

@@ -58,6 +58,9 @@ namespace BlackCore
s = connection.connect(serviceName, IContextSimulator::ObjectPath(), IContextSimulator::InterfaceName(),
"simulatorChanged", this, SIGNAL(simulatorChanged(BlackMisc::Simulation::CSimulatorInfo)));
Q_ASSERT(s);
s = connection.connect(serviceName, IContextSimulator::ObjectPath(), IContextSimulator::InterfaceName(),
"simulatorSettingsChanged", this, SIGNAL(simulatorSettingsChanged()));
Q_ASSERT(s);
s = connection.connect(serviceName, IContextSimulator::ObjectPath(), IContextSimulator::InterfaceName(),
"vitalityLost", this, SIGNAL(vitalityLost()));
Q_ASSERT(s);