mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 15:45:46 +08:00
refs #438, added plug info to listeners
* listener signal can be directly used without mapping * (during debugging) it is much easier to identify a listener
This commit is contained in:
@@ -327,8 +327,8 @@ namespace BlackSimPlugin
|
||||
return exclude;
|
||||
}
|
||||
|
||||
CSimulatorFs9Listener::CSimulatorFs9Listener(QObject *parent) :
|
||||
BlackCore::ISimulatorListener(parent),
|
||||
CSimulatorFs9Listener::CSimulatorFs9Listener(const CSimulatorPluginInfo &info, QObject *parent) :
|
||||
BlackCore::ISimulatorListener(info, parent),
|
||||
m_timer(new QTimer(this))
|
||||
{
|
||||
Q_CONSTEXPR int QueryInterval = 5 * 1000; // 5 seconds
|
||||
@@ -353,7 +353,7 @@ namespace BlackSimPlugin
|
||||
|
||||
if (!m_isStarted && fs9Host->isConnected())
|
||||
{
|
||||
emit simulatorStarted();
|
||||
emit simulatorStarted(getPluginInfo());
|
||||
m_isStarted = true;
|
||||
m_isConnecting = false;
|
||||
}
|
||||
@@ -402,9 +402,9 @@ namespace BlackSimPlugin
|
||||
return new CSimulatorFs9(info, ownAircraftProvider, remoteAircraftProvider, pluginStorageProvider, this);
|
||||
}
|
||||
|
||||
BlackCore::ISimulatorListener *CSimulatorFs9Factory::createListener(QObject *parent)
|
||||
BlackCore::ISimulatorListener *CSimulatorFs9Factory::createListener(const CSimulatorPluginInfo &info, QObject *parent)
|
||||
{
|
||||
return new CSimulatorFs9Listener(parent);
|
||||
return new CSimulatorFs9Listener(info, parent);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -128,7 +128,7 @@ namespace BlackSimPlugin
|
||||
|
||||
public:
|
||||
//! Constructor
|
||||
CSimulatorFs9Listener(QObject *parent);
|
||||
CSimulatorFs9Listener(const BlackMisc::Simulation::CSimulatorPluginInfo &info, QObject *parent);
|
||||
|
||||
public slots:
|
||||
//! \copydoc BlackCore::ISimulatorListener::start
|
||||
@@ -167,7 +167,7 @@ namespace BlackSimPlugin
|
||||
BlackMisc::IPluginStorageProvider *pluginStorageProvider) override;
|
||||
|
||||
//! \copydoc BlackCore::ISimulatorFactory::createListener
|
||||
virtual BlackCore::ISimulatorListener *createListener(QObject *parent = nullptr) override;
|
||||
virtual BlackCore::ISimulatorListener *createListener(const BlackMisc::Simulation::CSimulatorPluginInfo &info, QObject *parent = nullptr) override;
|
||||
|
||||
};
|
||||
} // namespace Fs9
|
||||
|
||||
Reference in New Issue
Block a user