mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 11:05:33 +08:00
refs #559, adjustments cache/settings moved
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
#ifndef BLACKCORE_SETTINGS_APPLICATION_H
|
||||
#define BLACKCORE_SETTINGS_APPLICATION_H
|
||||
|
||||
#include "blackcore/settingscache.h"
|
||||
#include "blackmisc/settingscache.h"
|
||||
#include "blackmisc/input/actionhotkeylist.h"
|
||||
|
||||
namespace BlackCore
|
||||
@@ -22,12 +22,12 @@ namespace BlackCore
|
||||
namespace Application
|
||||
{
|
||||
//! User configured hotkeys
|
||||
struct ActionHotkeys : public CSettingTrait<BlackMisc::Input::CActionHotkeyList>
|
||||
struct ActionHotkeys : public BlackMisc::CSettingTrait<BlackMisc::Input::CActionHotkeyList>
|
||||
{
|
||||
//! \copydoc BlackCore::CSettingTrait::key
|
||||
//! \copydoc BlackMisc::CSettingTrait::key
|
||||
static const char *key() { return "application/actionhotkeys"; }
|
||||
|
||||
//! \copydoc BlackCore::CSettingTrait::isValid
|
||||
//! \copydoc BlackMisc::CSettingTrait::isValid
|
||||
static bool isValid(const BlackMisc::Input::CActionHotkeyList &value)
|
||||
{
|
||||
for (const auto &actionHotkey : value)
|
||||
@@ -39,8 +39,8 @@ namespace BlackCore
|
||||
return true;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
} // ns
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
#endif
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#ifndef BLACKCORE_SETTINGS_AUDIO_H
|
||||
#define BLACKCORE_SETTINGS_AUDIO_H
|
||||
|
||||
#include "blackcore/settingscache.h"
|
||||
#include "blackmisc/settingscache.h"
|
||||
#include "blackmisc/audio/settings/settingsaudio.h"
|
||||
|
||||
namespace BlackCore
|
||||
@@ -22,15 +22,15 @@ namespace BlackCore
|
||||
namespace Audio
|
||||
{
|
||||
//! Name of text codec to use with text in FSD protocol
|
||||
struct AudioSettings : public CSettingTrait<BlackMisc::Audio::Settings::CSettingsAudio>
|
||||
struct AudioSettings : public BlackMisc::CSettingTrait<BlackMisc::Audio::Settings::CSettingsAudio>
|
||||
{
|
||||
//! \copydoc BlackCore::CSettingTrait::key
|
||||
//! \copydoc BlackMisc::CSettingTrait::key
|
||||
static const char *key() { return "audio/setup"; }
|
||||
|
||||
//! \copydoc BlackCore::CSettingTrait::defaultValue
|
||||
//! \copydoc BlackMisc::CSettingTrait::defaultValue
|
||||
static const BlackMisc::Audio::Settings::CSettingsAudio &defaultValue() { static const BlackMisc::Audio::Settings::CSettingsAudio a; return a; }
|
||||
|
||||
//! \copydoc BlackCore::CSettingTrait::isValid
|
||||
//! \copydoc BlackMisc::CSettingTrait::isValid
|
||||
static bool isValid(const BlackMisc::Audio::Settings::CSettingsAudio &value) { Q_UNUSED(value); return true; }
|
||||
};
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#ifndef BLACKCORE_SETTINGS_NETWORK_H
|
||||
#define BLACKCORE_SETTINGS_NETWORK_H
|
||||
|
||||
#include "blackcore/settingscache.h"
|
||||
#include "blackmisc/settingscache.h"
|
||||
#include "blackmisc/network/serverlist.h"
|
||||
#include <QTextCodec>
|
||||
|
||||
@@ -23,32 +23,32 @@ namespace BlackCore
|
||||
namespace Network
|
||||
{
|
||||
//! Name of text codec to use with text in FSD protocol
|
||||
struct WireTextCodec : public CSettingTrait<QString>
|
||||
struct WireTextCodec : public BlackMisc::CSettingTrait<QString>
|
||||
{
|
||||
//! \copydoc BlackCore::CSettingTrait::key
|
||||
//! \copydoc BlackMisc::CSettingTrait::key
|
||||
static const char *key() { return "network/wiretextcodec"; }
|
||||
|
||||
//! \copydoc BlackCore::CSettingTrait::defaultValue
|
||||
//! \copydoc BlackMisc::CSettingTrait::defaultValue
|
||||
static const QString &defaultValue() { static const QString dv("latin1"); return dv; }
|
||||
|
||||
//! \copydoc BlackCore::CSettingTrait::isValid
|
||||
//! \copydoc BlackMisc::CSettingTrait::isValid
|
||||
static bool isValid(const QString &value) { return QTextCodec::codecForName(qPrintable(value)); }
|
||||
};
|
||||
|
||||
//! Virtual air traffic servers
|
||||
struct TrafficServers : public CSettingTrait<BlackMisc::Network::CServerList>
|
||||
struct TrafficServers : public BlackMisc::CSettingTrait<BlackMisc::Network::CServerList>
|
||||
{
|
||||
//! \copydoc BlackCore::CSettingTrait::key
|
||||
//! \copydoc BlackMisc::CSettingTrait::key
|
||||
static const char *key() { return "network/trafficservers"; }
|
||||
};
|
||||
|
||||
//! Currently selected virtual air traffic server
|
||||
struct CurrentTrafficServer : public CSettingTrait<BlackMisc::Network::CServer>
|
||||
struct CurrentTrafficServer : public BlackMisc::CSettingTrait<BlackMisc::Network::CServer>
|
||||
{
|
||||
//! \copydoc BlackCore::CSettingTrait::key
|
||||
//! \copydoc BlackMisc::CSettingTrait::key
|
||||
static const char *key() { return "network/currenttrafficserver"; }
|
||||
|
||||
//! \copydoc BlackCore::CSettingTrait::defaultValue
|
||||
//! \copydoc BlackMisc::CSettingTrait::defaultValue
|
||||
static const BlackMisc::Network::CServer &defaultValue()
|
||||
{
|
||||
using namespace BlackMisc::Network;
|
||||
@@ -58,12 +58,12 @@ namespace BlackCore
|
||||
};
|
||||
|
||||
//! DBus server address
|
||||
struct DBusServerAddress : public CSettingTrait<QString>
|
||||
struct DBusServerAddress : public BlackMisc::CSettingTrait<QString>
|
||||
{
|
||||
//! \copydoc BlackCore::CSettingTrait::key
|
||||
//! \copydoc BlackMisc::CSettingTrait::key
|
||||
static const char *key() { return "network/dbusserver"; }
|
||||
|
||||
//! \copydoc BlackCore::CSettingTrait::defaultValue
|
||||
//! \copydoc BlackMisc::CSettingTrait::defaultValue
|
||||
static const QString &defaultValue() { static const QString dv("session"); return dv; }
|
||||
};
|
||||
} // ns
|
||||
|
||||
Reference in New Issue
Block a user