Improved handling of runtime based GUI components, allows to init all child components in one step

refs #195, follow up of fixing FSX configuration page as result of #217
This commit is contained in:
Klaus Basan
2014-04-28 19:12:27 +02:00
parent 72843fac90
commit 5e0e9faf71
3 changed files with 39 additions and 2 deletions

View File

@@ -16,7 +16,13 @@ namespace BlackGui
{
public:
//! Set runtime, usually set by runtime owner (must only be one, usually main window)
void setRuntime(BlackCore::CRuntime *runtime, bool runtimeOwner = false) { this->m_runtime = runtime; this->m_runtimeOwner = runtimeOwner; }
void setRuntime(BlackCore::CRuntime *runtime, bool runtimeOwner = false)
{
this->m_runtime = runtime; this->m_runtimeOwner = runtimeOwner;
}
//! Set runtime for each CRuntimeBasedComponent
static void setRuntimeForComponents(BlackCore::CRuntime *runtime, QWidget *parent);
protected:
//! Constructor
@@ -64,6 +70,12 @@ namespace BlackGui
//! Context for simulator
BlackCore::IContextSimulator *getIContextSimulator();
//! Send status message (via application context)
void sendStatusMessage(const BlackMisc::CStatusMessage &statusMessage);
//! Send status message (via application context)
void sendStatusMessages(const BlackMisc::CStatusMessageList &statusMessages);
//! Owner?
bool isRuntimeOwner() const { return this->m_runtimeOwner; }