refs #366 cleanup

* Removed obsolete signal from IContextSimulator
* Removed connectToSimulator() method from IContextSimulator as it is no
longer relevant
* CSimulatorComponent updates automatically when simulator disconnects
* FS9 & FSX drivers update (including FSCommon)
This commit is contained in:
Michał Garapich
2015-03-23 19:56:59 +01:00
committed by Roland Winklmeier
parent 63e48ae332
commit 4d4acb20bc
22 changed files with 68 additions and 122 deletions

View File

@@ -62,13 +62,22 @@ namespace BlackGui
void CSimulatorComponent::update()
{
Q_ASSERT(getIContextSimulator());
if (!this->isVisibleWidget()) return; // no updates on invisible widgets
if (!this->getIContextOwnAircraft()) return;
if (!this->getIContextSimulator()->isSimulating())
{
if (this->rowCount() == 1) { return; }
this->clear();
this->addOrUpdateByName("info", "sim not running", CIcons::StandardIconWarning16);
if (!this->getIContextSimulator()->isConnected()) {
addOrUpdateByName("info", tr("No simulator available"), CIcons::StandardIconWarning16);
return;
}
if (!this->getIContextSimulator()->isSimulating()) {
this->addOrUpdateByName("info",
tr("Simulator (%1) not yet running").arg(
getIContextSimulator()->getSimulatorInfo().getSimulator()
),
CIcons::StandardIconWarning16);
return;
}
@@ -118,6 +127,8 @@ namespace BlackGui
this->m_updateTimer->startTimer(intervalMs);
} else {
this->stopTimer();
clear();
update();
}
}