mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
refs #242, reordered runtime based component (methods order)
This commit is contained in:
@@ -3,29 +3,6 @@
|
||||
|
||||
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)
|
||||
{
|
||||
@@ -53,6 +30,42 @@ namespace BlackGui
|
||||
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()
|
||||
{
|
||||
if (!this->m_runtime) return nullptr;
|
||||
@@ -65,6 +78,18 @@ namespace BlackGui
|
||||
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()
|
||||
{
|
||||
if (!this->m_runtime) return nullptr;
|
||||
@@ -89,15 +114,4 @@ namespace BlackGui
|
||||
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.
|
||||
void createRuntime(const BlackCore::CRuntimeConfig &config, QObject *parent);
|
||||
|
||||
//! Context for network
|
||||
BlackCore::IContextNetwork *getIContextNetwork();
|
||||
//! Context for application
|
||||
const BlackCore::IContextApplication *getIContextApplication() const;
|
||||
|
||||
//! Context for network
|
||||
const BlackCore::IContextNetwork *getIContextNetwork() const;
|
||||
//! Context for application
|
||||
BlackCore::IContextApplication *getIContextApplication();
|
||||
|
||||
//! Context for audio
|
||||
BlackCore::IContextAudio *getIContextAudio();
|
||||
@@ -51,18 +51,24 @@ namespace BlackGui
|
||||
//! Context for audio
|
||||
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
|
||||
BlackCore::IContextSettings *getIContextSettings();
|
||||
|
||||
//! Context for settings
|
||||
const BlackCore::IContextSettings *getIContextSettings() const;
|
||||
|
||||
//! Context for application
|
||||
const BlackCore::IContextApplication *getIContextApplication() const;
|
||||
|
||||
//! Context for application
|
||||
BlackCore::IContextApplication *getIContextApplication();
|
||||
|
||||
//! Context for simulator
|
||||
const BlackCore::IContextSimulator *getIContextSimulator() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user