mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 13:36:48 +08:00
refs #195, base class for runtime aware GUI widgets
This commit is contained in:
70
src/blackgui/runtimebasedcomponent.cpp
Normal file
70
src/blackgui/runtimebasedcomponent.cpp
Normal file
@@ -0,0 +1,70 @@
|
||||
#include "runtimebasedcomponent.h"
|
||||
|
||||
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::createRuntime(const BlackCore::CRuntimeConfig &config, QObject *parent)
|
||||
{
|
||||
this->m_runtime = new BlackCore::CRuntime(config, parent);
|
||||
this->m_runtimeOwner = true;
|
||||
}
|
||||
|
||||
BlackCore::IContextNetwork *CRuntimeBasedComponent::getIContextNetwork()
|
||||
{
|
||||
if (!this->m_runtime) return nullptr;
|
||||
return this->m_runtime->getIContextNetwork();
|
||||
}
|
||||
|
||||
const BlackCore::IContextNetwork *CRuntimeBasedComponent::getIContextNetwork() const
|
||||
{
|
||||
if (!this->m_runtime) return nullptr;
|
||||
return this->m_runtime->getIContextNetwork();
|
||||
}
|
||||
|
||||
BlackCore::IContextSettings *CRuntimeBasedComponent::getIContextSettings()
|
||||
{
|
||||
if (!this->m_runtime) return nullptr;
|
||||
return this->m_runtime->getIContextSettings();
|
||||
}
|
||||
|
||||
const BlackCore::IContextSettings *CRuntimeBasedComponent::getIContextSettings() const
|
||||
{
|
||||
if (!this->m_runtime) return nullptr;
|
||||
return this->m_runtime->getIContextSettings();
|
||||
}
|
||||
|
||||
const BlackCore::IContextSimulator *CRuntimeBasedComponent::getIContextSimulator() const
|
||||
{
|
||||
if (!this->m_runtime) return nullptr;
|
||||
return this->m_runtime->getIContextSimulator();
|
||||
}
|
||||
|
||||
BlackCore::IContextSimulator *CRuntimeBasedComponent::getIContextSimulator()
|
||||
{
|
||||
if (!this->m_runtime) return nullptr;
|
||||
return this->m_runtime->getIContextSimulator();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user