Ref T270, Ref T268, plugin common / simulator improvements

* connect with "about to quit"
* added interface declarations
* sim statistics, use common function setStatsRemoteAircraftUpdate and double for average values
This commit is contained in:
Klaus Basan
2018-05-30 12:51:07 +02:00
parent 2923df27e2
commit aa7363dcad
11 changed files with 114 additions and 48 deletions

View File

@@ -24,10 +24,19 @@ namespace BlackSimPlugin
//! Common base class for simulator plugins
class CSimulatorPluginCommon : public BlackCore::CSimulatorCommon
{
Q_OBJECT
Q_INTERFACES(BlackCore::ISimulator)
Q_INTERFACES(BlackMisc::Simulation::ISimulationEnvironmentProvider)
Q_INTERFACES(BlackMisc::Simulation::IInterpolationSetupProvider)
public:
//! Destructor
virtual ~CSimulatorPluginCommon();
// --------- ISimulator implementations ------------
virtual void unload() override;
virtual bool disconnectFrom() override;
protected:
//! Constructor
CSimulatorPluginCommon(const BlackMisc::Simulation::CSimulatorPluginInfo &info,
@@ -45,9 +54,6 @@ namespace BlackSimPlugin
//! @}
virtual bool parseDetails(const BlackMisc::CSimpleCommandParser &parser) override;
// interface implementations
virtual void unload() override;
//! Register help
static void registerHelp();
@@ -55,7 +61,10 @@ namespace BlackSimPlugin
//! Show the interpolator display
void showInterpolationDisplay();
QPointer<BlackGui::Components::CInterpolationLogDisplayDialog> m_interpolationDisplay; //!< can be owned by main window after setting a parent
//! Clean up the interpolation log.display if any
void deleteInterpolationDisplay();
QPointer<BlackGui::Components::CInterpolationLogDisplayDialog> m_interpolationDisplayDialog; //!< can be owned by main window after setting a parent
};
} // namespace
} // namespace