mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 08:36:52 +08:00
refs #369, adjusted simulator drivers
* common base class BlackCore::CSimulatorCommon * using providers IOwnAircraftProvider, IRenderedAircraftProvider * using revers lookup in mapping * using CSimulatedAircraft / CSimulatedAircraftList * return values (success/failed) for member functions (e.g. setTimeSynchronization) * getMaxRenderedAircraft / setMaxRenderedAircraft prepared
This commit is contained in:
@@ -9,13 +9,33 @@
|
||||
|
||||
#include "simulator.h"
|
||||
|
||||
using namespace BlackMisc::Aviation;
|
||||
using namespace BlackSim;
|
||||
|
||||
namespace BlackCore
|
||||
{
|
||||
ISimulator::ISimulator(QObject *parent) : QObject(parent)
|
||||
{ }
|
||||
|
||||
void ISimulator::emitSimulatorCombinedStatus()
|
||||
{
|
||||
emit simulatorStatusChanged(isConnected(), isSimulating(), isPaused());
|
||||
}
|
||||
|
||||
CSimulatorCommon::CSimulatorCommon(const BlackSim::CSimulatorInfo &simInfo, BlackMisc::Simulation::IOwnAircraftProvider *ownAircraftProvider, BlackMisc::Simulation::IRenderedAircraftProvider *renderedAircraftProvider, QObject *parent)
|
||||
: ISimulator(parent), COwnAircraftProviderSupport(ownAircraftProvider), CRenderedAircraftProviderSupport(renderedAircraftProvider), m_simulatorInfo(simInfo)
|
||||
{ }
|
||||
|
||||
int CSimulatorCommon::getMaxRenderedAircraft() const
|
||||
{
|
||||
return m_maxRenderedAircraft;
|
||||
}
|
||||
|
||||
void CSimulatorCommon::setMaxRenderedAircraft(int maxRenderedAircraft)
|
||||
{
|
||||
m_maxRenderedAircraft = maxRenderedAircraft;
|
||||
}
|
||||
|
||||
CSimulatorInfo CSimulatorCommon::getSimulatorInfo() const
|
||||
{
|
||||
return m_simulatorInfo;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user