mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-06 10:26:03 +08:00
Ref T268, utilty functions for logging setup
This commit is contained in:
@@ -28,6 +28,12 @@ namespace BlackMisc
|
|||||||
return CInterpolationSetupList(setups.values());
|
return CInterpolationSetupList(setups.values());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool IInterpolationSetupProvider::hasSetupsPerCallsign() const
|
||||||
|
{
|
||||||
|
QReadLocker l(&m_lockSetup);
|
||||||
|
return !m_setups.isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
bool IInterpolationSetupProvider::setInterpolationSetupsPerCallsign(const CInterpolationSetupList &setups, bool ignoreSameAsGlobal)
|
bool IInterpolationSetupProvider::setInterpolationSetupsPerCallsign(const CInterpolationSetupList &setups, bool ignoreSameAsGlobal)
|
||||||
{
|
{
|
||||||
const CInterpolationAndRenderingSetupGlobal gs = this->getInterpolationSetupGlobal();
|
const CInterpolationAndRenderingSetupGlobal gs = this->getInterpolationSetupGlobal();
|
||||||
@@ -63,6 +69,13 @@ namespace BlackMisc
|
|||||||
return callsigns;
|
return callsigns;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool IInterpolationSetupProvider::isLogCallsign(const CCallsign &callsign) const
|
||||||
|
{
|
||||||
|
QReadLocker l(&m_lockSetup);
|
||||||
|
if (!m_setups.contains(callsign)) { return false; }
|
||||||
|
return m_setups[callsign].logInterpolation();
|
||||||
|
}
|
||||||
|
|
||||||
bool IInterpolationSetupProvider::setInterpolationMode(const QString &modeAsString, const CCallsign &callsign)
|
bool IInterpolationSetupProvider::setInterpolationMode(const QString &modeAsString, const CCallsign &callsign)
|
||||||
{
|
{
|
||||||
CInterpolationAndRenderingSetupPerCallsign setup = this->getInterpolationSetupPerCallsignOrDefault(callsign);
|
CInterpolationAndRenderingSetupPerCallsign setup = this->getInterpolationSetupPerCallsignOrDefault(callsign);
|
||||||
|
|||||||
@@ -36,11 +36,15 @@ namespace BlackMisc
|
|||||||
|
|
||||||
//! Get all setups per callsign
|
//! Get all setups per callsign
|
||||||
//! \threadsafe
|
//! \threadsafe
|
||||||
virtual CInterpolationSetupList getInterpolationSetupsPerCallsign() const;
|
CInterpolationSetupList getInterpolationSetupsPerCallsign() const;
|
||||||
|
|
||||||
|
//! Get all setups per callsign
|
||||||
|
//! \threadsafe
|
||||||
|
bool hasSetupsPerCallsign() const;
|
||||||
|
|
||||||
//! Set all setups per callsign
|
//! Set all setups per callsign
|
||||||
//! \threadsafe
|
//! \threadsafe
|
||||||
virtual bool setInterpolationSetupsPerCallsign(const CInterpolationSetupList &setups, bool ignoreSameAsGlobal = true);
|
bool setInterpolationSetupsPerCallsign(const CInterpolationSetupList &setups, bool ignoreSameAsGlobal = true);
|
||||||
|
|
||||||
//! The global setup
|
//! The global setup
|
||||||
//! \threadsafe
|
//! \threadsafe
|
||||||
@@ -50,6 +54,10 @@ namespace BlackMisc
|
|||||||
//! \threadsafe
|
//! \threadsafe
|
||||||
Aviation::CCallsignSet getLogCallsigns() const;
|
Aviation::CCallsignSet getLogCallsigns() const;
|
||||||
|
|
||||||
|
//! Is callsign marked for logging
|
||||||
|
//! \threadsafe
|
||||||
|
bool isLogCallsign(const Aviation::CCallsign &callsign) const;
|
||||||
|
|
||||||
//! Set mode as string
|
//! Set mode as string
|
||||||
//! \threadsafe
|
//! \threadsafe
|
||||||
bool setInterpolationMode(const QString &modeAsString, const Aviation::CCallsign &callsign);
|
bool setInterpolationMode(const QString &modeAsString, const Aviation::CCallsign &callsign);
|
||||||
|
|||||||
Reference in New Issue
Block a user