9 using namespace swift::misc::network;
39 QString s(
"timestamp: ");
43 s.append(
"VATSIM data file: ");
47 s.append(
"FSD servers: ");
54 if (index.
isMyself()) {
return QVariant::fromValue(*
this); }
60 case IndexFsdServers:
return QVariant::fromValue(this->m_fsdServers);
61 case IndexDataFiles:
return QVariant::fromValue(this->m_dataFileUrl);
82 case IndexFsdServers: this->m_fsdServers = variant.value<
CServerList>();
break;
83 case IndexDataFiles: this->m_dataFileUrl = variant.value<
CUrl>();
break;
VATSIM data (servers, URLs) cached as last known good setup.
const swift::misc::network::CServerList & getVoiceServers() const
Voice servers.
const swift::misc::network::CUrl & getServerFileUrl() const
Server file URL.
void setServerFileUrl(const swift::misc::network::CUrl &url)
Set server file URL.
void setDataFileUrl(const swift::misc::network::CUrl &url)
Set VATSIM data file URL.
const swift::misc::network::CServerList & getFsdServers() const
FSD servers.
void setFsdServers(const swift::misc::network::CServerList &servers)
Set FSD servers.
bool setServers(const swift::misc::network::CServerList &fsdServers, const swift::misc::network::CServerList &voiceServers)
Set servers.
QVariant propertyByIndex(swift::misc::CPropertyIndexRef index) const
Property by index.
ColumnIndex
Properties by index.
QString convertToQString(bool i18n=false) const
Cast as QString.
const swift::misc::network::CUrl & getMetarFileUrl() const
METAR file URL.
void setVoiceServers(const swift::misc::network::CServerList &servers)
Set voice servers.
void setPropertyByIndex(swift::misc::CPropertyIndexRef index, const QVariant &variant)
Set property by index.
const swift::misc::network::CUrl & getDataFileUrl() const
VATSIM data file URL.
bool setUrls(const swift::misc::network::CUrl &dataFileUrl, const swift::misc::network::CUrl &serverFileUrl, const swift::misc::network::CUrl &metarFileUrl)
Set all URLs and indicate if something has changed.
void setMetarFileUrl(const swift::misc::network::CUrl &url)
METAR file URL.
Non-owning reference to a CPropertyIndex with a subset of its features.
CastType frontCasted() const
First element casted to given type, usually the PropertIndex enum.
bool isMyself() const
Myself index, used with nesting.
void setPropertyByIndex(CPropertyIndexRef index, const QVariant &variant)
Set property by index.
QString getFormattedUtcTimestampYmdhms() const
As yyyy MM dd HH mm ss.
static bool canHandleIndex(CPropertyIndexRef index)
Can given index be handled.
QVariant propertyByIndex(CPropertyIndexRef index) const
Property by index.
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...
Core data traits (aka cached values) and classes.
Free functions in swift::misc.
#define SWIFT_DEFINE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template definition of mixins for a CValueObject subclass.