mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
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:
@@ -14,6 +14,9 @@ INCLUDEPATH += . $$SourceRoot/src
|
||||
SOURCES += *.cpp
|
||||
HEADERS += *.h
|
||||
|
||||
LIBS *= -lsimulatorplugincommon
|
||||
addStaticLibraryDependency(simulatorplugincommon)
|
||||
|
||||
contains(BLACK_CONFIG, FSUIPC) {
|
||||
equals(WORD_SIZE,32) {
|
||||
DEFINES += SWIFT_USING_FSUIPC32
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#ifndef BLACKSIMPLUGIN_FSCOMMON_SIMULATORFSCOMMON_H
|
||||
#define BLACKSIMPLUGIN_FSCOMMON_SIMULATORFSCOMMON_H
|
||||
|
||||
#include "blackcore/simulatorcommon.h"
|
||||
#include "../plugincommon/simulatorplugincommon.h"
|
||||
#include "blackmisc/simulation/interpolator.h"
|
||||
#include "blackmisc/simulation/fscommon/aircraftcfgparser.h"
|
||||
#include "fsuipc.h"
|
||||
@@ -25,7 +25,7 @@ namespace BlackSimPlugin
|
||||
namespace FsCommon
|
||||
{
|
||||
//! Common base class for MS flight simulators
|
||||
class CSimulatorFsCommon : public BlackCore::CSimulatorCommon
|
||||
class CSimulatorFsCommon : public Common::CSimulatorPluginCommon
|
||||
{
|
||||
public:
|
||||
//! Destructor
|
||||
|
||||
Reference in New Issue
Block a user