refs #485, renamed (CContextRuntime) to CCoreFacade

https://dev.vatsim-germany.org/issues/485#note-6
This commit is contained in:
Klaus Basan
2016-02-11 22:14:20 +01:00
committed by Mathew Sutcliffe
parent 79cbcbc88f
commit d9aac6427b
52 changed files with 263 additions and 245 deletions

View File

@@ -13,14 +13,14 @@
#define BLACKGUI_ENABLEFORRUNTIME_H
#include "blackgui/blackguiexport.h"
#include "blackcore/contextruntime.h"
#include "blackcore/corefacade.h"
#include "blackmisc/audio/notificationsounds.h"
#include <QTimer>
namespace BlackCore
{
class CRuntime;
class CRuntimeConfig;
class CCoreFacade;
class CCoreFacadeConfig;
class IContextApplication;
class IContextAudio;
class IContextNetwork;
@@ -37,15 +37,15 @@ namespace BlackGui
//! Component, which provides references to runtime objects
//! \details Access to runtime allows to encapsualate many aspects of data access and makes
//! the component widely independent from a central data provideer
//! \sa BlackCore::CRuntime
//! \sa BlackCore::CCoreFacade
class BLACKGUI_EXPORT CEnableForRuntime
{
public:
//! Set runtime, usually set by runtime owner (must only be one, usually main window)
void setRuntime(BlackCore::CRuntime *runtime, bool runtimeOwner = false);
void setRuntime(BlackCore::CCoreFacade *runtime, bool runtimeOwner = false);
//! Set runtime for each CRuntimeBasedComponent
static void setRuntimeForComponents(BlackCore::CRuntime *runtime, QWidget *parent);
static void setRuntimeForComponents(BlackCore::CCoreFacade *runtime, QWidget *parent);
//! Log message category
static const BlackMisc::CLogCategoryList &getLogCategories()
@@ -58,18 +58,18 @@ namespace BlackGui
//! Constructor
//! \remarks Usually runtime will be provided later, not at initialization time.
//! If runtime is provided right now, make sure to call runtimeHasBeenSet afterwards
CEnableForRuntime(BlackCore::CRuntime *runtime = nullptr, bool runtimeOwner = false) :
CEnableForRuntime(BlackCore::CCoreFacade *runtime = nullptr, bool runtimeOwner = false) :
m_runtime(runtime), m_runtimeOwner(runtimeOwner)
{}
//! Runtime const
const BlackCore::CRuntime *getRuntime() const { return this->m_runtime;}
const BlackCore::CCoreFacade *getRuntime() const { return this->m_runtime;}
//! Runtime non const
BlackCore::CRuntime *getRuntime() { return this->m_runtime;}
BlackCore::CCoreFacade *getRuntime() { return this->m_runtime;}
//! Create a runtime (becomes owner). Only create one runtime.
void createRuntime(const BlackCore::CRuntimeConfig &config, QObject *parent);
void createRuntime(const BlackCore::CCoreFacadeConfig &config, QObject *parent);
//! Context for application
const BlackCore::IContextApplication *getIContextApplication() const;
@@ -108,14 +108,14 @@ namespace BlackGui
//! \remarks use this methods to hook up signal/slots with runtime
virtual void runtimeHasBeenSet() {}
//! \copydoc BlackCore::CRuntime::hasRemoteApplicationContext
//! \copydoc BlackCore::CCoreFacade::hasRemoteApplicationContext
bool hasRemoteApplicationContext() const { return this->m_runtime->hasRemoteApplicationContext(); }
//! Play a given notification sound
void playNotifcationSound(BlackMisc::Audio::CNotificationSounds::Notification notification) const;
private:
BlackCore::CRuntime *m_runtime;
BlackCore::CCoreFacade *m_runtime;
bool m_runtimeOwner;
};
}