refs #829, consolidated settings for simulator/messages

* move traits from blackcore to blackmisc
* renamed CSimulatorSettings/Messages
This commit is contained in:
Klaus Basan
2016-12-10 05:31:42 +01:00
parent 763e92cc2a
commit b69008e0b3
22 changed files with 151 additions and 189 deletions

View File

@@ -479,7 +479,7 @@ namespace BlackCore
{
if (!isSimulatorSimulating()) { return; }
if (!this->getIContextOwnAircraft()) { return; }
const CSettingsSimulatorMessages settings = m_messageSettings.getThreadLocal();
const CSimulatorMessagesSettings settings = m_messageSettings.getThreadLocal();
const CSimulatedAircraft ownAircraft = this->getIContextOwnAircraft()->getOwnAircraft();
for (const auto &tm : textMessages)
{
@@ -526,7 +526,7 @@ namespace BlackCore
void CContextSimulator::ps_relayStatusMessageToSimulator(const BlackMisc::CStatusMessage &message)
{
if (!isSimulatorSimulating()) { return; }
const CSettingsSimulatorMessages simMsg = m_messageSettings.getThreadLocal();
const CSimulatorMessagesSettings simMsg = m_messageSettings.getThreadLocal();
if (simMsg.relayThisStatusMessage(message))
{
m_simulatorPlugin.second->displayStatusMessage(message);

View File

@@ -32,7 +32,7 @@
#include "blackmisc/simulation/simulatorplugininfo.h"
#include "blackmisc/simulation/simulatorplugininfolist.h"
#include "blackmisc/simulation/simulatorinternals.h"
#include "blackmisc/simulation/simulationsettings.h"
#include "blackmisc/simulation/simulatorsettings.h"
#include "blackmisc/worker.h"
#include <QObject>

View File

@@ -1,46 +0,0 @@
/* Copyright (C) 2016
* swift project Community / Contributors
*
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
* including this file, may be copied, modified, propagated, or distributed except according to the terms
* contained in the LICENSE file.
*/
//! \file
#ifndef BLACKCORE_SIMULATOR_SETTINGS_H
#define BLACKCORE_SIMULATOR_SETTINGS_H
#include "blackmisc/settingscache.h"
#include "blackmisc/weather/weatherscenario.h"
#include "blackmisc/simulation/distributorlistpreferences.h"
namespace BlackCore
{
namespace Simulator
{
//! Selected weather scenario
struct TSelectedWeatherScenario : public BlackMisc::TSettingTrait<BlackMisc::Weather::CWeatherScenario>
{
//! \copydoc BlackCore::TSettingTrait::key
static const char *key() { return "simulator/selectedweatherscenario"; }
//! \copydoc BlackCore::TSettingTrait::defaultValue
static const BlackMisc::Weather::CWeatherScenario &defaultValue()
{
static const BlackMisc::Weather::CWeatherScenario scenario {};
return scenario;
}
};
//! Mapping preferences for model distributor list
struct TDistributorListPreferences : public BlackMisc::TSettingTrait<BlackMisc::Simulation::CDistributorListPreferences>
{
//! \copydoc BlackMisc::TSettingTrait::key
static const char *key() { return "mapping/distributorpreferences"; }
};
} // ns
} // ns
#endif