diff --git a/src/blackcore/context/context.cpp b/src/blackcore/context/context.cpp index 4ee2844fd..a5054851c 100644 --- a/src/blackcore/context/context.cpp +++ b/src/blackcore/context/context.cpp @@ -15,83 +15,83 @@ namespace BlackCore { namespace Context { - const CLogCategoryList &CContext::getLogCategories() + const CLogCategoryList &IContext::getLogCategories() { static const BlackMisc::CLogCategoryList cats { BlackMisc::CLogCategory::context() }; return cats; } - IContextNetwork *CContext::getIContextNetwork() + IContextNetwork *IContext::getIContextNetwork() { return this->getRuntime()->getIContextNetwork(); } - const IContextNetwork *CContext::getIContextNetwork() const + const IContextNetwork *IContext::getIContextNetwork() const { return this->getRuntime()->getIContextNetwork(); } - IContextAudio *CContext::getIContextAudio() + IContextAudio *IContext::getIContextAudio() { return this->getRuntime()->getIContextAudio(); } - const IContextAudio *CContext::getIContextAudio() const + const IContextAudio *IContext::getIContextAudio() const { return this->getRuntime()->getIContextAudio(); } - IContextApplication *CContext::getIContextApplication() + IContextApplication *IContext::getIContextApplication() { return this->getRuntime()->getIContextApplication(); } - const IContextApplication *CContext::getIContextApplication() const + const IContextApplication *IContext::getIContextApplication() const { return this->getRuntime()->getIContextApplication(); } - IContextOwnAircraft *CContext::getIContextOwnAircraft() + IContextOwnAircraft *IContext::getIContextOwnAircraft() { return this->getRuntime()->getIContextOwnAircraft(); } - const IContextOwnAircraft *CContext::getIContextOwnAircraft() const + const IContextOwnAircraft *IContext::getIContextOwnAircraft() const { return this->getRuntime()->getIContextOwnAircraft(); } - IContextSimulator *CContext::getIContextSimulator() + IContextSimulator *IContext::getIContextSimulator() { return this->getRuntime()->getIContextSimulator(); } - void CContext::setDebugEnabled(bool debug) + void IContext::setDebugEnabled(bool debug) { if (this->m_debugEnabled == debug) { return; } emit this->changedLogOrDebugSettings(); } - bool CContext::isDebugEnabled() const + bool IContext::isDebugEnabled() const { return this->m_debugEnabled; } - void CContext::relayBaseClassSignals(const QString &serviceName, QDBusConnection &connection, const QString &objectPath, const QString &interfaceName) + void IContext::relayBaseClassSignals(const QString &serviceName, QDBusConnection &connection, const QString &objectPath, const QString &interfaceName) { bool s = connection.connect(serviceName, objectPath, interfaceName, "changedLogOrDebugSettings", this, SIGNAL(changedLogOrDebugSettings())); Q_ASSERT(s); } - const IContextSimulator *CContext::getIContextSimulator() const + const IContextSimulator *IContext::getIContextSimulator() const { return this->getRuntime()->getIContextSimulator(); } - const CStatusMessage &CContext::statusMessageEmptyContext() + const CStatusMessage &IContext::statusMessageEmptyContext() { - static const CStatusMessage m(static_cast(nullptr), CStatusMessage::SeverityWarning, u"empty context"); + static const CStatusMessage m(static_cast(nullptr), CStatusMessage::SeverityWarning, u"empty context"); return m; } } // ns diff --git a/src/blackcore/context/context.h b/src/blackcore/context/context.h index 89ab156d9..3b3183b75 100644 --- a/src/blackcore/context/context.h +++ b/src/blackcore/context/context.h @@ -11,9 +11,9 @@ #ifndef BLACKCORE_CONTEXT_CONTEXT_H #define BLACKCORE_CONTEXT_CONTEXT_H -#include "blackcore/blackcoreexport.h" #include "blackcore/corefacade.h" #include "blackcore/corefacadeconfig.h" +#include "blackcore/blackcoreexport.h" #include "blackmisc/logcategory.h" #include "blackmisc/logmessage.h" #include "blackmisc/statusmessage.h" @@ -36,13 +36,13 @@ namespace BlackCore class IContextSimulator; //! Base for all context classes - class BLACKCORE_EXPORT CContext : public QObject + class BLACKCORE_EXPORT IContext : public QObject { Q_OBJECT public: //! Destructor - virtual ~CContext() {} + virtual ~IContext() {} //! Log categories static const BlackMisc::CLogCategoryList &getLogCategories(); @@ -145,7 +145,7 @@ namespace BlackCore bool m_debugEnabled = false; //!< debug messages enabled //! Constructor - CContext(CCoreFacadeConfig::ContextMode mode, QObject *parent) : + IContext(CCoreFacadeConfig::ContextMode mode, QObject *parent) : QObject(parent), m_mode(mode), m_contextId(QDateTime::currentMSecsSinceEpoch()) {} diff --git a/src/blackcore/context/contextapplication.cpp b/src/blackcore/context/contextapplication.cpp index 6c16eba96..91f34ff0c 100644 --- a/src/blackcore/context/contextapplication.cpp +++ b/src/blackcore/context/contextapplication.cpp @@ -48,7 +48,7 @@ namespace BlackCore } IContextApplication::IContextApplication(CCoreFacadeConfig::ContextMode mode, CCoreFacade *runtime) : - CContext(mode, runtime) + IContext(mode, runtime) { if (mode == CCoreFacadeConfig::NotUsed) { return; } QPointer myself(this); diff --git a/src/blackcore/context/contextapplication.h b/src/blackcore/context/contextapplication.h index e24046e38..3beef680a 100644 --- a/src/blackcore/context/contextapplication.h +++ b/src/blackcore/context/contextapplication.h @@ -65,7 +65,7 @@ namespace BlackCore using CSettingsDictionary = BlackMisc::CDictionary; //! Application context interface - class BLACKCORE_EXPORT IContextApplication : public CContext + class BLACKCORE_EXPORT IContextApplication : public IContext { Q_OBJECT Q_CLASSINFO("D-Bus Interface", BLACKCORE_CONTEXTAPPLICATION_INTERFACENAME) diff --git a/src/blackcore/context/contextaudio.h b/src/blackcore/context/contextaudio.h index 0eb9e885d..e15396434 100644 --- a/src/blackcore/context/contextaudio.h +++ b/src/blackcore/context/contextaudio.h @@ -58,14 +58,14 @@ namespace BlackCore namespace Context { //! Audio context interface - class BLACKCORE_EXPORT IContextAudio : public CContext + class BLACKCORE_EXPORT IContextAudio : public IContext { Q_OBJECT Q_CLASSINFO("D-Bus Interface", BLACKCORE_CONTEXTAUDIO_INTERFACENAME) protected: //! Constructor - IContextAudio(CCoreFacadeConfig::ContextMode mode, CCoreFacade *runtime) : CContext(mode, runtime) {} + IContextAudio(CCoreFacadeConfig::ContextMode mode, CCoreFacade *runtime) : IContext(mode, runtime) {} public: //! Interface name diff --git a/src/blackcore/context/contextaudioimpl.h b/src/blackcore/context/contextaudioimpl.h index bd65757bc..701df7a01 100644 --- a/src/blackcore/context/contextaudioimpl.h +++ b/src/blackcore/context/contextaudioimpl.h @@ -12,11 +12,13 @@ #define BLACKCORE_CONTEXT_CONTEXTAUDIO_IMPL_H #include "blackcore/context/contextaudio.h" +#include "blackcore/afv/clients/afvclient.h" #include "blackcore/audio/audiosettings.h" #include "blackcore/actionbind.h" #include "blackcore/corefacadeconfig.h" #include "blackcore/blackcoreexport.h" -#include "blackcore/afv/clients/afvclient.h" +#include "blacksound/selcalplayer.h" +#include "blacksound/notificationplayer.h" #include "blackmisc/audio/audiosettings.h" #include "blackmisc/audio/audiodeviceinfolist.h" #include "blackmisc/audio/notificationsounds.h" @@ -33,8 +35,6 @@ #include "blackmisc/settingscache.h" #include "blackmisc/icons.h" #include "blackmisc/network/connectionstatus.h" -#include "blacksound/selcalplayer.h" -#include "blacksound/notificationplayer.h" #include #include diff --git a/src/blackcore/context/contextnetwork.h b/src/blackcore/context/contextnetwork.h index e5845289a..3b475489b 100644 --- a/src/blackcore/context/contextnetwork.h +++ b/src/blackcore/context/contextnetwork.h @@ -73,7 +73,7 @@ namespace BlackCore namespace Context { //! Network context proxy - class BLACKCORE_EXPORT IContextNetwork : public CContext + class BLACKCORE_EXPORT IContextNetwork : public IContext { Q_OBJECT Q_CLASSINFO("D-Bus Interface", BLACKCORE_CONTEXTNETWORK_INTERFACENAME) @@ -374,7 +374,7 @@ namespace BlackCore protected: //! Constructor - IContextNetwork(CCoreFacadeConfig::ContextMode mode, CCoreFacade *runtime) : CContext(mode, runtime) {} + IContextNetwork(CCoreFacadeConfig::ContextMode mode, CCoreFacade *runtime) : IContext(mode, runtime) {} }; } // ns } // ns diff --git a/src/blackcore/context/contextnetworkimpl.cpp b/src/blackcore/context/contextnetworkimpl.cpp index 2a917741a..690ff1a9e 100644 --- a/src/blackcore/context/contextnetworkimpl.cpp +++ b/src/blackcore/context/contextnetworkimpl.cpp @@ -796,7 +796,7 @@ namespace BlackCore const ReverseLookupLogging revEnabled = m_airspace->isReverseLookupMessagesEnabled(); if (revEnabled == enable) { return; } m_airspace->enableReverseLookupMessages(enable); - emit CContext::changedLogOrDebugSettings(); + emit IContext::changedLogOrDebugSettings(); } CStatusMessageList CContextNetwork::getAircraftPartsHistory(const CCallsign &callsign) const @@ -827,7 +827,7 @@ namespace BlackCore { if (this->isDebugEnabled()) { CLogMessage(this, CLogCategory::contextSlot()).debug() << enabled; } m_airspace->enableAircraftPartsHistory(enabled); - emit CContext::changedLogOrDebugSettings(); + emit IContext::changedLogOrDebugSettings(); } int CContextNetwork::aircraftSituationsAdded() const diff --git a/src/blackcore/context/contextownaircraft.h b/src/blackcore/context/contextownaircraft.h index 26cb9b407..6cbdd8f20 100644 --- a/src/blackcore/context/contextownaircraft.h +++ b/src/blackcore/context/contextownaircraft.h @@ -58,7 +58,7 @@ namespace BlackCore { //! Own context proxy //! \ingroup dbus - class BLACKCORE_EXPORT IContextOwnAircraft : public CContext + class BLACKCORE_EXPORT IContextOwnAircraft : public IContext { Q_OBJECT Q_CLASSINFO("D-Bus Interface", BLACKCORE_CONTEXTOWNAIRCRAFT_INTERFACENAME) @@ -177,7 +177,7 @@ namespace BlackCore protected: //! Constructor - IContextOwnAircraft(CCoreFacadeConfig::ContextMode mode, CCoreFacade *runtime) : CContext(mode, runtime) {} + IContextOwnAircraft(CCoreFacadeConfig::ContextMode mode, CCoreFacade *runtime) : IContext(mode, runtime) {} }; } // ns } // ns diff --git a/src/blackcore/context/contextsimulator.h b/src/blackcore/context/contextsimulator.h index 87ec0670d..4a41302c0 100644 --- a/src/blackcore/context/contextsimulator.h +++ b/src/blackcore/context/contextsimulator.h @@ -63,7 +63,7 @@ namespace BlackCore namespace Context { //! Network context - class BLACKCORE_EXPORT IContextSimulator : public CContext + class BLACKCORE_EXPORT IContextSimulator : public IContext { Q_OBJECT Q_CLASSINFO("D-Bus Interface", BLACKCORE_CONTEXTSIMULATOR_INTERFACENAME) @@ -334,7 +334,7 @@ namespace BlackCore protected: //! Constructor - IContextSimulator(CCoreFacadeConfig::ContextMode mode, CCoreFacade *runtime) : CContext(mode, runtime) {} + IContextSimulator(CCoreFacadeConfig::ContextMode mode, CCoreFacade *runtime) : IContext(mode, runtime) {} }; } // namespace } // namespace diff --git a/src/blackcore/context/contextsimulatorimpl.cpp b/src/blackcore/context/contextsimulatorimpl.cpp index 0268ea4f1..ce5badd30 100644 --- a/src/blackcore/context/contextsimulatorimpl.cpp +++ b/src/blackcore/context/contextsimulatorimpl.cpp @@ -948,7 +948,7 @@ namespace BlackCore if (m_debugEnabled) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO << matchingLogToString(enabled); } if (m_logMatchingMessages == enabled) { return; } m_logMatchingMessages = enabled; - emit CContext::changedLogOrDebugSettings(); + emit IContext::changedLogOrDebugSettings(); } CMatchingStatistics CContextSimulator::getCurrentMatchingStatistics(bool missingOnly) const