mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 21:56:43 +08:00
Ref T289, merge CSimulatorCommonn/ISimulator
This commit is contained in:
@@ -89,31 +89,31 @@ namespace BlackSimPlugin
|
||||
bool CSimulatorEmulated::logicallyAddRemoteAircraft(const CSimulatedAircraft &remoteAircraft)
|
||||
{
|
||||
if (canLog()) { m_monitorWidget->appendReceivingCall(Q_FUNC_INFO, remoteAircraft.toQString()); }
|
||||
return CSimulatorCommon::logicallyAddRemoteAircraft(remoteAircraft);
|
||||
return ISimulator::logicallyAddRemoteAircraft(remoteAircraft);
|
||||
}
|
||||
|
||||
bool CSimulatorEmulated::logicallyRemoveRemoteAircraft(const CCallsign &callsign)
|
||||
{
|
||||
if (canLog()) { m_monitorWidget->appendReceivingCall(Q_FUNC_INFO, callsign.toQString()); }
|
||||
return CSimulatorCommon::logicallyRemoveRemoteAircraft(callsign);
|
||||
return ISimulator::logicallyRemoveRemoteAircraft(callsign);
|
||||
}
|
||||
|
||||
int CSimulatorEmulated::physicallyRemoveMultipleRemoteAircraft(const CCallsignSet &callsigns)
|
||||
{
|
||||
if (canLog()) m_monitorWidget->appendReceivingCall(Q_FUNC_INFO, callsigns.toQString());
|
||||
return CSimulatorCommon::physicallyRemoveMultipleRemoteAircraft(callsigns);
|
||||
return ISimulator::physicallyRemoveMultipleRemoteAircraft(callsigns);
|
||||
}
|
||||
|
||||
bool CSimulatorEmulated::changeRemoteAircraftModel(const CSimulatedAircraft &aircraft)
|
||||
{
|
||||
if (canLog()) { m_monitorWidget->appendReceivingCall(Q_FUNC_INFO, aircraft.toQString()); }
|
||||
return CSimulatorCommon::changeRemoteAircraftEnabled(aircraft);
|
||||
return ISimulator::changeRemoteAircraftEnabled(aircraft);
|
||||
}
|
||||
|
||||
bool CSimulatorEmulated::changeRemoteAircraftEnabled(const CSimulatedAircraft &aircraft)
|
||||
{
|
||||
if (canLog()) { m_monitorWidget->appendReceivingCall(Q_FUNC_INFO, aircraft.toQString()); }
|
||||
return CSimulatorCommon::changeRemoteAircraftEnabled(aircraft);
|
||||
return ISimulator::changeRemoteAircraftEnabled(aircraft);
|
||||
}
|
||||
|
||||
bool CSimulatorEmulated::updateOwnSimulatorCockpit(const CSimulatedAircraft &aircraft, const CIdentifier &originator)
|
||||
@@ -176,7 +176,7 @@ namespace BlackSimPlugin
|
||||
void CSimulatorEmulated::highlightAircraft(const CSimulatedAircraft &aircraftToHighlight, bool enableHighlight, const CTime &displayTime)
|
||||
{
|
||||
if (canLog()) { m_monitorWidget->appendReceivingCall(Q_FUNC_INFO, aircraftToHighlight.toQString(), boolToTrueFalse(enableHighlight), displayTime.toQString()); }
|
||||
CSimulatorCommon::highlightAircraft(aircraftToHighlight, enableHighlight, displayTime);
|
||||
ISimulator::highlightAircraft(aircraftToHighlight, enableHighlight, displayTime);
|
||||
}
|
||||
|
||||
bool CSimulatorEmulated::parseCommandLine(const QString &commandLine, const CIdentifier &originator)
|
||||
@@ -308,7 +308,7 @@ namespace BlackSimPlugin
|
||||
int CSimulatorEmulated::physicallyRemoveAllRemoteAircraft()
|
||||
{
|
||||
if (canLog()) { m_monitorWidget->appendReceivingCall(Q_FUNC_INFO); }
|
||||
return CSimulatorCommon::physicallyRemoveAllRemoteAircraft();
|
||||
return ISimulator::physicallyRemoveAllRemoteAircraft();
|
||||
}
|
||||
|
||||
bool CSimulatorEmulated::parseDetails(const CSimpleCommandParser &parser)
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace BlackSimPlugin
|
||||
virtual bool isPhysicallyRenderedAircraft(const BlackMisc::Aviation::CCallsign &callsign) const override;
|
||||
virtual BlackMisc::Aviation::CCallsignSet physicallyRenderedAircraft() const override;
|
||||
|
||||
// functions just logged
|
||||
// ----- functions just logged -------
|
||||
virtual void highlightAircraft(const BlackMisc::Simulation::CSimulatedAircraft &aircraftToHighlight, bool enableHighlight, const BlackMisc::PhysicalQuantities::CTime &displayTime) override;
|
||||
virtual bool logicallyAddRemoteAircraft(const BlackMisc::Simulation::CSimulatedAircraft &remoteAircraft) override;
|
||||
virtual bool logicallyRemoveRemoteAircraft(const BlackMisc::Aviation::CCallsign &callsign) override;
|
||||
@@ -129,7 +129,7 @@ namespace BlackSimPlugin
|
||||
// just logged
|
||||
virtual int physicallyRemoveAllRemoteAircraft() override;
|
||||
|
||||
//! \copydoc BlackCore::CSimulatorCommon::parseDetails
|
||||
//! \copydoc BlackCore::ISimulator::parseDetails
|
||||
virtual bool parseDetails(const BlackMisc::CSimpleCommandParser &parser) override;
|
||||
|
||||
private:
|
||||
|
||||
@@ -123,7 +123,7 @@ namespace BlackSimPlugin
|
||||
CAirportList CSimulatorFsCommon::getAirportsInRange() const
|
||||
{
|
||||
if (!m_airportsInRangeFromSimulator.isEmpty()) { return m_airportsInRangeFromSimulator; }
|
||||
return CSimulatorCommon::getAirportsInRange();
|
||||
return ISimulator::getAirportsInRange();
|
||||
}
|
||||
|
||||
void CSimulatorFsCommon::onSwiftDbAirportsRead()
|
||||
@@ -133,7 +133,7 @@ namespace BlackSimPlugin
|
||||
{
|
||||
m_airportsInRangeFromSimulator.updateMissingParts(webServiceAirports);
|
||||
}
|
||||
CSimulatorCommon::onSwiftDbAirportsRead();
|
||||
ISimulator::onSwiftDbAirportsRead();
|
||||
}
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
@@ -20,8 +20,6 @@
|
||||
#include <QObject>
|
||||
#include <memory>
|
||||
|
||||
#include <blackcore/simulatorcommon.h>
|
||||
|
||||
namespace BlackSimPlugin
|
||||
{
|
||||
namespace FsCommon
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace BlackSimPlugin
|
||||
IWeatherGridProvider *weatherGridProvider,
|
||||
IClientProvider *clientProvider,
|
||||
QObject *parent) :
|
||||
CSimulatorCommon(info, ownAircraftProvider, renderedAircraftProvider, weatherGridProvider, clientProvider, parent)
|
||||
ISimulator(info, ownAircraftProvider, renderedAircraftProvider, weatherGridProvider, clientProvider, parent)
|
||||
{
|
||||
CSimulatorPluginCommon::registerHelp();
|
||||
}
|
||||
@@ -75,19 +75,19 @@ namespace BlackSimPlugin
|
||||
this->showInterpolationDisplay();
|
||||
return true;
|
||||
}
|
||||
return CSimulatorCommon::parseDetails(parser);
|
||||
return false;
|
||||
}
|
||||
|
||||
void CSimulatorPluginCommon::unload()
|
||||
{
|
||||
this->deleteInterpolationDisplay();
|
||||
CSimulatorCommon::unload();
|
||||
ISimulator::unload();
|
||||
}
|
||||
|
||||
bool CSimulatorPluginCommon::disconnectFrom()
|
||||
{
|
||||
this->deleteInterpolationDisplay();
|
||||
return CSimulatorCommon::disconnectFrom();
|
||||
return ISimulator::disconnectFrom();
|
||||
}
|
||||
|
||||
void CSimulatorPluginCommon::registerHelp()
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#ifndef BLACKSIMPLUGIN_COMMON_SIMULATORPLUGINCOMMON_H
|
||||
#define BLACKSIMPLUGIN_COMMON_SIMULATORPLUGINCOMMON_H
|
||||
|
||||
#include "blackcore/simulatorcommon.h"
|
||||
#include "blackcore/simulator.h"
|
||||
#include <QObject>
|
||||
#include <QPointer>
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace BlackSimPlugin
|
||||
namespace Common
|
||||
{
|
||||
//! Common base class for simulator plugins
|
||||
class CSimulatorPluginCommon : public BlackCore::CSimulatorCommon
|
||||
class CSimulatorPluginCommon : public BlackCore::ISimulator
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(BlackCore::ISimulator)
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
#include "xplanempaircraft.h"
|
||||
#include "plugins/simulator/xplaneconfig/simulatorxplaneconfig.h"
|
||||
#include "plugins/simulator/plugincommon/simulatorplugincommon.h"
|
||||
#include "blackcore/simulator.h"
|
||||
#include "blackcore/simulatorcommon.h"
|
||||
#include "blackmisc/simulation/aircraftmodellist.h"
|
||||
#include "blackmisc/simulation/data/modelcaches.h"
|
||||
#include "blackmisc/simulation/settings/simulatorsettings.h"
|
||||
|
||||
Reference in New Issue
Block a user