mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-18 19:35:33 +08:00
refs #242, reordered runtime based component (methods order)
This commit is contained in:
@@ -3,29 +3,6 @@
|
|||||||
|
|
||||||
namespace BlackGui
|
namespace BlackGui
|
||||||
{
|
{
|
||||||
const BlackCore::IContextApplication *CRuntimeBasedComponent::getIContextApplication() const
|
|
||||||
{
|
|
||||||
if (!this->m_runtime) return nullptr;
|
|
||||||
return this->m_runtime->getIContextApplication();
|
|
||||||
}
|
|
||||||
|
|
||||||
BlackCore::IContextApplication *CRuntimeBasedComponent::getIContextApplication()
|
|
||||||
{
|
|
||||||
if (!this->m_runtime) return nullptr;
|
|
||||||
return this->m_runtime->getIContextApplication();
|
|
||||||
}
|
|
||||||
|
|
||||||
BlackCore::IContextAudio *CRuntimeBasedComponent::getIContextAudio()
|
|
||||||
{
|
|
||||||
if (!this->m_runtime) return nullptr;
|
|
||||||
return this->m_runtime->getIContextAudio();
|
|
||||||
}
|
|
||||||
|
|
||||||
const BlackCore::IContextAudio *CRuntimeBasedComponent::getIContextAudio() const
|
|
||||||
{
|
|
||||||
if (!this->m_runtime) return nullptr;
|
|
||||||
return this->m_runtime->getIContextAudio();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CRuntimeBasedComponent::setRuntime(BlackCore::CRuntime *runtime, bool runtimeOwner)
|
void CRuntimeBasedComponent::setRuntime(BlackCore::CRuntime *runtime, bool runtimeOwner)
|
||||||
{
|
{
|
||||||
@@ -53,6 +30,42 @@ namespace BlackGui
|
|||||||
this->m_runtimeOwner = true;
|
this->m_runtimeOwner = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CRuntimeBasedComponent::sendStatusMessage(const BlackMisc::CStatusMessage &statusMessage)
|
||||||
|
{
|
||||||
|
Q_ASSERT(this->getIContextApplication());
|
||||||
|
this->getIContextApplication()->sendStatusMessage(statusMessage);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CRuntimeBasedComponent::sendStatusMessages(const BlackMisc::CStatusMessageList &statusMessages)
|
||||||
|
{
|
||||||
|
Q_ASSERT(this->getIContextApplication());
|
||||||
|
this->getIContextApplication()->sendStatusMessages(statusMessages);
|
||||||
|
}
|
||||||
|
|
||||||
|
const BlackCore::IContextApplication *CRuntimeBasedComponent::getIContextApplication() const
|
||||||
|
{
|
||||||
|
if (!this->m_runtime) return nullptr;
|
||||||
|
return this->m_runtime->getIContextApplication();
|
||||||
|
}
|
||||||
|
|
||||||
|
BlackCore::IContextApplication *CRuntimeBasedComponent::getIContextApplication()
|
||||||
|
{
|
||||||
|
if (!this->m_runtime) return nullptr;
|
||||||
|
return this->m_runtime->getIContextApplication();
|
||||||
|
}
|
||||||
|
|
||||||
|
BlackCore::IContextAudio *CRuntimeBasedComponent::getIContextAudio()
|
||||||
|
{
|
||||||
|
if (!this->m_runtime) return nullptr;
|
||||||
|
return this->m_runtime->getIContextAudio();
|
||||||
|
}
|
||||||
|
|
||||||
|
const BlackCore::IContextAudio *CRuntimeBasedComponent::getIContextAudio() const
|
||||||
|
{
|
||||||
|
if (!this->m_runtime) return nullptr;
|
||||||
|
return this->m_runtime->getIContextAudio();
|
||||||
|
}
|
||||||
|
|
||||||
BlackCore::IContextNetwork *CRuntimeBasedComponent::getIContextNetwork()
|
BlackCore::IContextNetwork *CRuntimeBasedComponent::getIContextNetwork()
|
||||||
{
|
{
|
||||||
if (!this->m_runtime) return nullptr;
|
if (!this->m_runtime) return nullptr;
|
||||||
@@ -65,6 +78,18 @@ namespace BlackGui
|
|||||||
return this->m_runtime->getIContextNetwork();
|
return this->m_runtime->getIContextNetwork();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BlackCore::IContextOwnAircraft *CRuntimeBasedComponent::getIContextOwnAircraft()
|
||||||
|
{
|
||||||
|
if (!this->m_runtime) return nullptr;
|
||||||
|
return this->m_runtime->getIContextOwnAircraft();
|
||||||
|
}
|
||||||
|
|
||||||
|
const BlackCore::IContextOwnAircraft *CRuntimeBasedComponent::getIContextOwnAircraft() const
|
||||||
|
{
|
||||||
|
if (!this->m_runtime) return nullptr;
|
||||||
|
return this->m_runtime->getIContextOwnAircraft();
|
||||||
|
}
|
||||||
|
|
||||||
BlackCore::IContextSettings *CRuntimeBasedComponent::getIContextSettings()
|
BlackCore::IContextSettings *CRuntimeBasedComponent::getIContextSettings()
|
||||||
{
|
{
|
||||||
if (!this->m_runtime) return nullptr;
|
if (!this->m_runtime) return nullptr;
|
||||||
@@ -89,15 +114,4 @@ namespace BlackGui
|
|||||||
return this->m_runtime->getIContextSimulator();
|
return this->m_runtime->getIContextSimulator();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CRuntimeBasedComponent::sendStatusMessage(const BlackMisc::CStatusMessage &statusMessage)
|
|
||||||
{
|
|
||||||
Q_ASSERT(this->getIContextApplication());
|
|
||||||
this->getIContextApplication()->sendStatusMessage(statusMessage);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CRuntimeBasedComponent::sendStatusMessages(const BlackMisc::CStatusMessageList &statusMessages)
|
|
||||||
{
|
|
||||||
Q_ASSERT(this->getIContextApplication());
|
|
||||||
this->getIContextApplication()->sendStatusMessages(statusMessages);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,11 +39,11 @@ namespace BlackGui
|
|||||||
//! Create a runtime (becomes owner). Only create one runtime.
|
//! Create a runtime (becomes owner). Only create one runtime.
|
||||||
void createRuntime(const BlackCore::CRuntimeConfig &config, QObject *parent);
|
void createRuntime(const BlackCore::CRuntimeConfig &config, QObject *parent);
|
||||||
|
|
||||||
//! Context for network
|
//! Context for application
|
||||||
BlackCore::IContextNetwork *getIContextNetwork();
|
const BlackCore::IContextApplication *getIContextApplication() const;
|
||||||
|
|
||||||
//! Context for network
|
//! Context for application
|
||||||
const BlackCore::IContextNetwork *getIContextNetwork() const;
|
BlackCore::IContextApplication *getIContextApplication();
|
||||||
|
|
||||||
//! Context for audio
|
//! Context for audio
|
||||||
BlackCore::IContextAudio *getIContextAudio();
|
BlackCore::IContextAudio *getIContextAudio();
|
||||||
@@ -51,18 +51,24 @@ namespace BlackGui
|
|||||||
//! Context for audio
|
//! Context for audio
|
||||||
const BlackCore::IContextAudio *getIContextAudio() const;
|
const BlackCore::IContextAudio *getIContextAudio() const;
|
||||||
|
|
||||||
|
//! Context for network
|
||||||
|
BlackCore::IContextNetwork *getIContextNetwork();
|
||||||
|
|
||||||
|
//! Context for network
|
||||||
|
const BlackCore::IContextNetwork *getIContextNetwork() const;
|
||||||
|
|
||||||
|
//! Context for own aircraft
|
||||||
|
const BlackCore::IContextOwnAircraft *getIContextOwnAircraft() const;
|
||||||
|
|
||||||
|
//! Context for own aircraft
|
||||||
|
BlackCore::IContextOwnAircraft *getIContextOwnAircraft();
|
||||||
|
|
||||||
//! Context for settings
|
//! Context for settings
|
||||||
BlackCore::IContextSettings *getIContextSettings();
|
BlackCore::IContextSettings *getIContextSettings();
|
||||||
|
|
||||||
//! Context for settings
|
//! Context for settings
|
||||||
const BlackCore::IContextSettings *getIContextSettings() const;
|
const BlackCore::IContextSettings *getIContextSettings() const;
|
||||||
|
|
||||||
//! Context for application
|
|
||||||
const BlackCore::IContextApplication *getIContextApplication() const;
|
|
||||||
|
|
||||||
//! Context for application
|
|
||||||
BlackCore::IContextApplication *getIContextApplication();
|
|
||||||
|
|
||||||
//! Context for simulator
|
//! Context for simulator
|
||||||
const BlackCore::IContextSimulator *getIContextSimulator() const;
|
const BlackCore::IContextSimulator *getIContextSimulator() const;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user