Ref T270, added CSimulatorPluginCommon as base class in driver project

* unlike BlackCore::CSimulatorCommon we can add also UI aspects here
* used by emulated driver, XP and the FS series
This commit is contained in:
Klaus Basan
2018-05-16 21:23:00 +02:00
parent afe4a09218
commit 2ae8f5b03f
17 changed files with 247 additions and 69 deletions

View File

@@ -22,6 +22,7 @@ using namespace BlackMisc::Simulation;
using namespace BlackMisc::Simulation::FsCommon;
using namespace BlackMisc::Weather;
using namespace BlackCore;
using namespace BlackSimPlugin::Common;
namespace BlackSimPlugin
{
@@ -34,7 +35,7 @@ namespace BlackSimPlugin
IWeatherGridProvider *weatherGridProvider,
IClientProvider *clientProvider,
QObject *parent) :
CSimulatorCommon(info, ownAircraftProvider, renderedAircraftProvider, weatherGridProvider, clientProvider, parent),
CSimulatorPluginCommon(info, ownAircraftProvider, renderedAircraftProvider, weatherGridProvider, clientProvider, parent),
m_fsuipc(std::make_unique<CFsuipc>(this))
{
CSimulatorFsCommon::registerHelp();
@@ -67,7 +68,7 @@ namespace BlackSimPlugin
CLogMessage(this, CLogCategory::cmdLine()).info("FSUIPC is '%1'") << boolToOnOff(s);
return s;
}
return false;
return CSimulatorPluginCommon::parseDetails(parser);
}
void CSimulatorFsCommon::registerHelp()
@@ -121,10 +122,7 @@ namespace BlackSimPlugin
CAirportList CSimulatorFsCommon::getAirportsInRange() const
{
if (!m_airportsInRangeFromSimulator.isEmpty())
{
return m_airportsInRangeFromSimulator;
}
if (!m_airportsInRangeFromSimulator.isEmpty()) { return m_airportsInRangeFromSimulator; }
return CSimulatorCommon::getAirportsInRange();
}