mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
Ref T286, moved server settings into "network" namespace (not VATSIM specific)
This commit is contained in:
@@ -16,18 +16,19 @@
|
||||
#include "blackcore/context/contextownaircraft.h"
|
||||
#include "blackcore/corefacadeconfig.h"
|
||||
#include "blackcore/vatsim/vatsimsettings.h"
|
||||
#include "blackmisc/network/settings/servers.h"
|
||||
#include "blackmisc/network/user.h"
|
||||
#include "blackmisc/simulation/aircraftmodel.h"
|
||||
#include "blackmisc/simulation/ownaircraftprovider.h"
|
||||
#include "blackmisc/simulation/simulatedaircraft.h"
|
||||
#include "blackmisc/aviation/aircraftparts.h"
|
||||
#include "blackmisc/aviation/airlineicaocode.h"
|
||||
#include "blackmisc/aviation/atcstation.h"
|
||||
#include "blackmisc/aviation/comsystem.h"
|
||||
#include "blackmisc/aviation/selcal.h"
|
||||
#include "blackmisc/geo/coordinategeodetic.h"
|
||||
#include "blackmisc/network/user.h"
|
||||
#include "blackmisc/pq/frequency.h"
|
||||
#include "blackmisc/pq/length.h"
|
||||
#include "blackmisc/simulation/aircraftmodel.h"
|
||||
#include "blackmisc/simulation/ownaircraftprovider.h"
|
||||
#include "blackmisc/simulation/simulatedaircraft.h"
|
||||
#include "blackmisc/settingscache.h"
|
||||
#include "blackmisc/identifiable.h"
|
||||
#include "blackmisc/identifier.h"
|
||||
@@ -185,7 +186,7 @@ namespace BlackCore
|
||||
QString m_voiceRoom2UrlOverride; //!< overridden voice room url
|
||||
mutable QReadWriteLock m_lockAircraft; //!< lock aircraft
|
||||
|
||||
BlackMisc::CSetting<Vatsim::TCurrentTrafficServer> m_currentNetworkServer { this };
|
||||
BlackMisc::CSetting<BlackMisc::Network::Settings::TCurrentTrafficServer> m_currentNetworkServer { this };
|
||||
|
||||
//! Station has been changed, needed to tune in/out voice room
|
||||
//! \ingroup crosscontextfunction
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "blackcore/data/vatsimsetup.h"
|
||||
#include "blackcore/blackcoreexport.h"
|
||||
#include "blackmisc/network/data/lastserver.h"
|
||||
#include "blackmisc/network/settings/servers.h"
|
||||
#include "blackmisc/network/serverlist.h"
|
||||
#include "blackmisc/settingscache.h"
|
||||
#include "blackmisc/metaclass.h"
|
||||
@@ -75,7 +76,7 @@ namespace BlackCore
|
||||
//! Settings have been changed
|
||||
void onSettingsChanged();
|
||||
|
||||
BlackMisc::CSettingReadOnly<BlackCore::Vatsim::TTrafficServers> m_otherTrafficNetworkServers { this, &CNetworkSetup::onSettingsChanged };
|
||||
BlackMisc::CSettingReadOnly<BlackMisc::Network::Settings::TTrafficServers> m_otherTrafficNetworkServers { this, &CNetworkSetup::onSettingsChanged };
|
||||
BlackMisc::CData<BlackMisc::Network::Data::TLastServer> m_lastServer { this, &CNetworkSetup::onSettingsChanged }; //!< recently used server (VATSIM, other)
|
||||
BlackMisc::CData<BlackCore::Data::TVatsimLastServer> m_lastVatsimServer { this, &CNetworkSetup::onSettingsChanged }; //!< recently used VATSIM server
|
||||
};
|
||||
|
||||
@@ -24,38 +24,6 @@ namespace BlackCore
|
||||
{
|
||||
namespace Vatsim
|
||||
{
|
||||
/*!
|
||||
* Virtual air traffic servers
|
||||
*/
|
||||
struct TTrafficServers : public BlackMisc::TSettingTrait<BlackMisc::Network::CServerList>
|
||||
{
|
||||
//! \copydoc BlackMisc::TSettingTrait::key
|
||||
static const char *key() { return "network/trafficservers"; }
|
||||
|
||||
//! \copydoc BlackCore::TSettingTrait::humanReadable
|
||||
static const QString &humanReadable() { static const QString name("Traffic servers"); return name; }
|
||||
};
|
||||
|
||||
/*!
|
||||
* Currently selected virtual air traffic server
|
||||
*/
|
||||
struct TCurrentTrafficServer : public BlackMisc::TSettingTrait<BlackMisc::Network::CServer>
|
||||
{
|
||||
//! \copydoc BlackMisc::TSettingTrait::key
|
||||
static const char *key() { return "network/currenttrafficserver"; }
|
||||
|
||||
//! \copydoc BlackCore::TSettingTrait::humanReadable
|
||||
static const QString &humanReadable() { static const QString name("Current traffic servers"); return name; }
|
||||
|
||||
//! \copydoc BlackMisc::TSettingTrait::defaultValue
|
||||
static const BlackMisc::Network::CServer &defaultValue()
|
||||
{
|
||||
using namespace BlackMisc::Network;
|
||||
static const CServer dv = CServer::swiftFsdTestServer();
|
||||
return dv;
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
* Settings used with readers
|
||||
*/
|
||||
@@ -104,7 +72,7 @@ namespace BlackCore
|
||||
static const CReaderSettings &neverUpdateSettings();
|
||||
|
||||
private:
|
||||
BlackMisc::PhysicalQuantities::CTime m_initialTime { 30.0, BlackMisc::PhysicalQuantities::CTimeUnit::s()};
|
||||
BlackMisc::PhysicalQuantities::CTime m_initialTime { 30.0, BlackMisc::PhysicalQuantities::CTimeUnit::s()};
|
||||
BlackMisc::PhysicalQuantities::CTime m_periodicTime { 30.0, BlackMisc::PhysicalQuantities::CTimeUnit::s()};
|
||||
bool m_neverUpdate = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user