Make fast position update settings persistent

Instead of enabling fast position updates via context methods, the
settings API will be used instead. This also allowed to move the timer
into CNetworkVatlib instead of CAirspaceMonitor. The only necessary thing
was to regularly update the receiver callsign set.

refs #677
This commit is contained in:
Roland Winklmeier
2016-06-17 10:17:00 +02:00
parent 1d1ca0faa3
commit fbad0977fd
13 changed files with 54 additions and 121 deletions

View File

@@ -190,12 +190,6 @@ namespace BlackCore
std::function<void(const BlackMisc::Simulation::CAirspaceAircraftSnapshot &)> aircraftSnapshotSlot
) override;
//! Is interim position sending enabled?
bool isFastPositionSendingEnabled() const;
//! Enable interim position sending
void enableFastPositionSending(bool enable);
//! Analyzer
CAirspaceAnalyzer *analyzer() const { return m_analyzer; }
@@ -254,9 +248,7 @@ namespace BlackCore
CAirspaceAnalyzer *m_analyzer = nullptr; //!< owned analyzer
bool m_serverSupportsNameQuery = false; //!< not all servers support name query
bool m_connected = false; //!< retrieve data
bool m_sendInterimPositions = false; //!< send interim positions to other clients
bool m_logMatchingProcess = false; //!< shall we log. information about the matching process
QTimer m_interimPositionUpdateTimer;
// locks
mutable QReadWriteLock m_lockSituations; //!< lock for situations
@@ -320,7 +312,7 @@ namespace BlackCore
void ps_receivedDataFile();
void ps_aircraftConfigReceived(const BlackMisc::Aviation::CCallsign &callsign, const QJsonObject &jsonObject, bool isFull);
void ps_aircraftInterimUpdateReceived(const BlackMisc::Aviation::CAircraftSituation &situation);
void ps_sendInterimPositions();
};
} // namespace