Ref T709, changed to settings provider

* CPlugin is the provider
* it is "kept" in DBus object for traffic, service, weather
This commit is contained in:
Klaus Basan
2019-07-30 01:01:36 +02:00
committed by Mat Sutcliffe
parent 97926eee26
commit f9c87326fb
10 changed files with 63 additions and 46 deletions

View File

@@ -12,11 +12,11 @@
//! \file
#include "dbusobject.h"
#include "settings.h"
#include "command.h"
#include "datarefs.h"
#include "terrainprobe.h"
#include "menus.h"
#include "settings.h"
#include "XPMPMultiplayer.h"
#include "XPLMCamera.h"
#include <XPLM/XPLMDisplay.h>
@@ -37,7 +37,7 @@ namespace XSwiftBus
{
public:
//! Constructor
CTraffic(CSettings *staticSettings);
CTraffic(ISettingsProvider *settingsProvider);
//! Destructor
~CTraffic() override;
@@ -129,11 +129,14 @@ namespace XSwiftBus
std::string ownAircraftString() const { return "ownAircraft"; }
protected:
//! Handler
virtual void dbusDisconnectedHandler() override;
//! Handler
DBusHandlerResult dbusMessageHandler(const CDBusMessage &message) override;
private:
//! Camera
struct DeltaCameraPosition
{
double dx = 0.0;
@@ -144,8 +147,6 @@ namespace XSwiftBus
bool isInitialized = false;
};
static CSettings *s_pluginSettings; //!< needs to be static for static functions
bool m_initialized = false;
bool m_enabledMultiplayer = false;
CTerrainProbe m_terrainProbe;