7 #include <QStringBuilder>
10 #include <QVersionNumber>
22 using namespace swift::config;
24 using namespace swift::misc::json;
25 using namespace swift::misc::network;
66 static const CServerList hardcoded({ CServer::fscFsdServer(), CServer::esTowerView() });
68 testServers.addIfAddressNotExists(hardcoded);
74 if (m_mappingMinimumVersion.
isEmpty()) {
return false; }
76 return CBuildConfig::getVersion() >= min;
83 QString s = u
"Global setup loaded: " % separator % u
"Mapping min.version: " %
86 % u
"Help URL: " % m_onlineHelpUrl.
toQString(i18n) % separator;
143 case IndexDbHttpsPort: m_dbHttpsPort = variant.
toInt();
break;
144 case IndexDbLoginService:
break;
145 case IndexVatsimData: m_vatsimDataFileUrl = variant.
value<
CUrl>();
break;
146 case IndexVatsimServer: m_vatsimServerFileUrl = variant.
value<
CUrl>();
break;
147 case IndexVatsimHttpFsd: m_vatsimFsdHttpUrl = variant.
value<
CUrl>();
break;
148 case IndexVatsimMetars: m_vatsimMetarsUrl = variant.
value<
CUrl>();
break;
149 case IndexSharedUrl: m_sharedUrl = variant.
value<
CUrl>();
break;
150 case IndexOnlineHelpUrl: m_onlineHelpUrl = variant.
value<
CUrl>();
break;
151 case IndexMappingMinimumVersion: m_mappingMinimumVersion = variant.
toString();
break;
152 case IndexPredefinedServers: m_predefinedServers = variant.
value<
CServerList>();
break;
153 case IndexAfvApiServerUrl: m_afvApiServerUrl = variant.
value<
CUrl>();
break;
154 case IndexAfvMapUrl: m_afvMapUrl = variant.
value<
CUrl>();
break;
162 static const QString v(
"0.7.0");
Global settings for readers, debug flags, etc.
void setPropertyByIndex(swift::misc::CPropertyIndexRef index, const QVariant &variant)
Set property by index.
const swift::misc::network::CUrl & getSwiftSharedUrl() const
Shared URL.
swift::misc::network::CUrl getVatsimServerFileUrl() const
VATSIM server file URL.
bool dbDebugFlag() const
Debug flag.
bool isSwiftVersionMinimumMappingVersion() const
Meets the minimum mapping version.
const QString & getMappingMinimumVersionString() const
Creating mappings requires at least this version or higher.
swift::misc::network::CUrl getDbIcaoReaderUrl() const
ICAO reader URL.
swift::misc::network::CUrl getDbAirportReaderUrl() const
Airport reader URL.
swift::misc::network::CUrl getDbHomePageUrl() const
Home page url.
swift::misc::network::CUrl getDbInfoReaderUrl() const
Info data reader URL.
ColumnIndex
Properties by index.
swift::misc::network::CUrl getDbLoginServiceUrl() const
Login service.
swift::misc::network::CUrl getLegalDirectoryUrl() const
Legal directory URL.
const swift::misc::network::CUrl & getDbRootDirectoryUrl() const
Root directory of DB.
void setServerDebugFlag(bool debug)
Set debug flag.
const swift::misc::network::CUrl & getVatsimDataFileUrl() const
VATSIM data file URL.
static const QString & schemaVersionString()
Schema version (shared files, bootstrap file)
swift::misc::network::CUrl getHelpPageUrl() const
Help page URL.
swift::misc::network::CServerList getPredefinedServersPlusHardcodedServers() const
Predefined plus hardcoded.
QString convertToQString(bool i18n=false) const
Cast as QString.
const swift::misc::network::CUrl & getVatsimMetarsUrl() const
VATSIM METAR URL.
swift::misc::network::CUrl getDbModelReaderUrl() const
Model reader URL.
swift::misc::network::CUrl getAfvMapUrl() const
AFV map URL.
const swift::misc::network::CServerList & getPredefinedServers() const
Predefined servers.
QVariant propertyByIndex(swift::misc::CPropertyIndexRef index) const
Property by index.
swift::misc::network::CUrl getSharedDbDataDirectoryUrl()
Get shared DB data directory URL.
swift::misc::network::CUrl getAfvApiServerUrl() const
AFV voice server URL.
Base class with a member CIdentifier to be inherited by a class which has an identity in the environm...
Non-owning reference to a CPropertyIndex with a subset of its features.
Q_REQUIRED_RESULT CPropertyIndexRef copyFrontRemoved() const
Copy with first element removed.
CastType frontCasted() const
First element casted to given type, usually the PropertIndex enum.
bool isMyself() const
Myself index, used with nesting.
static CVariant fromValue(T &&value)
Construct a variant from a value.
void setPropertyByIndex(CPropertyIndexRef index, const QVariant &variant)
Set property by index.
QVariant propertyByIndex(CPropertyIndexRef index) const
Property by index.
QString toQString(bool i18n=false) const
Cast as QString.
Value object encapsulating a list of servers.
Value object encapsulating information of a location, kind of simplified CValueObject compliant versi...
void setPropertyByIndex(swift::misc::CPropertyIndexRef index, const QVariant &variant)
Set property by index.
CUrl withSwitchedScheme(const QString &protocol, int port) const
Switch protocol.
CUrl withAppendedPath(const QString &path) const
Append path.
Core data traits (aka cached values) and classes.
Free functions in swift::misc.
bool isEmpty() const const
QVariant fromValue(T &&value)
int toInt(bool *ok) const const
QString toString() const const
QVersionNumber fromString(QAnyStringView string, qsizetype *suffixIndex)
#define SWIFT_DEFINE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template definition of mixins for a CValueObject subclass.