Settings, added TSettingTrait::humanReadable and used copydoc, T159 related

This commit is contained in:
Klaus Basan
2017-09-22 01:17:04 +02:00
committed by Mathew Sutcliffe
parent 88a1c9f5d4
commit 7cdfe8c914
15 changed files with 116 additions and 24 deletions

View File

@@ -28,6 +28,9 @@ namespace BlackCore
//! \copydoc BlackMisc::TSettingTrait::key
static const char *key() { return "application/actionhotkeys"; }
//! \copydoc BlackCore::TSettingTrait::humanReadable
static const QString &humanReadable() { static const QString name("Hotkeys"); return name; }
//! \copydoc BlackMisc::TSettingTrait::isValid
static bool isValid(const BlackMisc::Input::CActionHotkeyList &value)
{
@@ -47,6 +50,9 @@ namespace BlackCore
//! \copydoc BlackCore::TSettingTrait::key
static const char *key() { return "application/enabledsimulators"; }
//! \copydoc BlackCore::TSettingTrait::humanReadable
static const QString &humanReadable() { static const QString name("Enabled simulators"); return name; }
//! \copydoc BlackCore::TSettingTrait::defaultValue
static const QStringList &defaultValue()
{
@@ -55,7 +61,7 @@ namespace BlackCore
return enabledSimulators;
}
//! Simulator plugin identifiers valid?
//! \copydoc BlackCore::TSettingTrait::isValid
static bool isValid(const QStringList &pluginIdentifiers)
{
for (const QString &pluginIdentifier : pluginIdentifiers)
@@ -75,6 +81,9 @@ namespace BlackCore
//! \copydoc BlackMisc::TSettingTrait::key
static const char *key() { return "application/crashdumpuploadenabled"; }
//! \copydoc BlackCore::TSettingTrait::humanReadable
static const QString &humanReadable() { static const QString name("Crash dumps"); return name; }
//! \copydoc BlackMisc::TSettingTrait::defaultValue
static bool defaultValue() { return true; }
};

View File

@@ -26,6 +26,9 @@ namespace BlackCore
//! \copydoc BlackMisc::TSettingTrait::key
static const char *key() { return "audio/setup"; }
//! \copydoc BlackCore::TSettingTrait::humanReadable
static const QString &humanReadable() { static const QString name("Audio"); return name; }
//! \copydoc BlackMisc::TSettingTrait::isValid
static bool isValid(const BlackMisc::Audio::CSettings &value) { Q_UNUSED(value); return true; }
};
@@ -35,6 +38,9 @@ namespace BlackCore
{
//! \copydoc BlackMisc::TSettingTrait::key
static const char *key() { return "audio/inputdevice"; }
//! \copydoc BlackCore::TSettingTrait::humanReadable
static const QString &humanReadable() { static const QString name("Input device"); return name; }
};
//! Audio input device settings
@@ -42,8 +48,10 @@ namespace BlackCore
{
//! \copydoc BlackMisc::TSettingTrait::key
static const char *key() { return "audio/outputdevice"; }
};
//! \copydoc BlackCore::TSettingTrait::humanReadable
static const QString &humanReadable() { static const QString name("Output device"); return name; }
};
} // ns
} // ns

View File

@@ -29,6 +29,9 @@ namespace BlackCore
{
//! \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; }
};
/*!
@@ -39,6 +42,9 @@ namespace BlackCore
//! \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()
{
@@ -114,6 +120,9 @@ namespace BlackCore
//! \copydoc BlackCore::TSettingTrait::key
static const char *key() { return "vatsimreaders/bookings"; }
//! \copydoc BlackCore::TSettingTrait::humanReadable
static const QString &humanReadable() { static const QString name("VATSIM bookings"); return name; }
//! \copydoc BlackCore::TSettingTrait::defaultValue
static const BlackCore::Vatsim::CReaderSettings &defaultValue()
{
@@ -128,6 +137,9 @@ namespace BlackCore
//! \copydoc BlackCore::TSettingTrait::key
static const char *key() { return "vatsimreaders/datafile"; }
//! \copydoc BlackCore::TSettingTrait::humanReadable
static const QString &humanReadable() { static const QString name("VATSIM data file"); return name; }
//! \copydoc BlackCore::TSettingTrait::defaultValue
static const BlackCore::Vatsim::CReaderSettings &defaultValue()
{
@@ -142,6 +154,9 @@ namespace BlackCore
//! \copydoc BlackCore::TSettingTrait::key
static const char *key() { return "vatsimreaders/metars"; }
//! \copydoc BlackCore::TSettingTrait::humanReadable
static const QString &humanReadable() { static const QString name("VATSIM METARs"); return name; }
//! \copydoc BlackCore::TSettingTrait::defaultValue
static const BlackCore::Vatsim::CReaderSettings &defaultValue()
{