mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 15:45:46 +08:00
Remove ISimulator::getSimulatorInfo()
To provide maximum flexibility, the simulator info is specified by each plugin in the JSON metadata file. * Renamed SCimulatorInfo to CSimulatorPluginInfo * Removed pre-defined simulator infos (UnspecifiedSim, FSX, etc) * CContextSimulator keeps track of which plugin is loaded and its info * QSignalMapper keeps track of which listener emitted the simulatorStared() signal * CSimulatorPluginInfo contains name, simulator name and description * TODO: GUI part * TODO: CTestFsCommon
This commit is contained in:
committed by
Roland Winklmeier
parent
3897fb2d1a
commit
63e48ae332
@@ -15,7 +15,7 @@
|
||||
#include "multiplayer_packets.h"
|
||||
#include "multiplayer_packet_parser.h"
|
||||
#include "blackcore/interpolator_linear.h"
|
||||
#include "blacksim/simulatorinfo.h"
|
||||
#include "blacksim/simulatorplugininfo.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
#include "blackmisc/project.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
@@ -47,7 +47,7 @@ namespace BlackSimPlugin
|
||||
{
|
||||
CSimulatorFs9::CSimulatorFs9(IOwnAircraftProvider *ownAircraftProvider,
|
||||
IRemoteAircraftProvider *remoteAircraftProvider, QObject *parent) :
|
||||
CSimulatorFsCommon(CSimulatorInfo::FS9(), ownAircraftProvider, remoteAircraftProvider, parent)
|
||||
CSimulatorFsCommon(CSimulatorPluginInfo::FS9(), ownAircraftProvider, remoteAircraftProvider, parent)
|
||||
{
|
||||
connect(lobbyClient.data(), &CLobbyClient::disconnected, this, std::bind(&CSimulatorFs9::simulatorStatusChanged, this, 0));
|
||||
connect(fs9Host.data(), &CFs9Host::customPacketReceived, this, &CSimulatorFs9::ps_processFs9Message);
|
||||
@@ -339,9 +339,9 @@ namespace BlackSimPlugin
|
||||
return new CSimulatorFs9(ownAircraftProvider, remoteAircraftProvider, parent);
|
||||
}
|
||||
|
||||
BlackSim::CSimulatorInfo CSimulatorFs9Factory::getSimulatorInfo() const
|
||||
BlackSim::CSimulatorPluginInfo CSimulatorFs9Factory::getSimulatorInfo() const
|
||||
{
|
||||
return CSimulatorInfo::FS9();
|
||||
return CSimulatorPluginInfo::FS9();
|
||||
}
|
||||
|
||||
BlackCore::ISimulatorListener *CSimulatorFs9Factory::createListener(QObject *parent)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include "blackcore/interpolator.h"
|
||||
#include "blackmisc/simulation/aircraftmodel.h"
|
||||
#include "blackmisc/avaircraft.h"
|
||||
#include "blacksim/simulatorinfo.h"
|
||||
#include "blacksim/simulatorplugininfo.h"
|
||||
#include "blackmisc/pixmap.h"
|
||||
#include <QObject>
|
||||
#include <QtPlugin>
|
||||
@@ -130,7 +130,7 @@ namespace BlackSimPlugin
|
||||
|
||||
QTimer* m_timer = nullptr;
|
||||
bool m_lobbyConnected = false;
|
||||
const BlackSim::CSimulatorInfo m_simulatorInfo = BlackSim::CSimulatorInfo::FS9();
|
||||
const BlackSim::CSimulatorPluginInfo m_simulatorInfo = BlackSim::CSimulatorPluginInfo::FS9();
|
||||
|
||||
};
|
||||
|
||||
@@ -153,7 +153,7 @@ namespace BlackSimPlugin
|
||||
QObject *parent) override;
|
||||
|
||||
//! Simulator info
|
||||
virtual BlackSim::CSimulatorInfo getSimulatorInfo() const override;
|
||||
virtual BlackSim::CSimulatorPluginInfo getSimulatorInfo() const override;
|
||||
|
||||
//! \copydoc BlackCore::ISimulatorFactory::createListener
|
||||
virtual BlackCore::ISimulatorListener *createListener(QObject *parent = nullptr) override;
|
||||
|
||||
Reference in New Issue
Block a user