mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 15:45:46 +08:00
* only init QDbusServer for P2P * changed init order of contexts in runtime * use "fake" signal to call setComVoiceRooms (remote in GUI) * added slot to change voice room callsign * used "org.swift" instead of "net.vatim" (just style) * used const QString for serviceName * added correct copyright header (just style)
34 lines
1.1 KiB
C++
34 lines
1.1 KiB
C++
/* Copyright (C) 2013 VATSIM Community / contributors
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#include "context_settings.h"
|
|
#include "context_settings_impl.h"
|
|
#include "context_settings_proxy.h"
|
|
|
|
namespace BlackCore
|
|
{
|
|
|
|
IContextSettings *IContextSettings::create(CRuntime *parent, CRuntimeConfig::ContextMode mode, CDBusServer *server, QDBusConnection &conn)
|
|
{
|
|
switch (mode)
|
|
{
|
|
case CRuntimeConfig::Local:
|
|
case CRuntimeConfig::LocalInDbusServer:
|
|
{
|
|
CContextSettings *contextSettings = new CContextSettings(mode, parent);
|
|
contextSettings->registerWithDBus(server);
|
|
contextSettings->read();
|
|
return contextSettings;
|
|
}
|
|
case CRuntimeConfig::Remote:
|
|
return new BlackCore::CContextSettingsProxy(BlackCore::CDBusServer::ServiceName(), conn, mode, parent);
|
|
default:
|
|
qFatal("Always initialize a settings context");
|
|
return nullptr;
|
|
}
|
|
}
|
|
|
|
}
|