6 #include <QStringBuilder>
10 using namespace swift::misc::network;
14 namespace swift::misc::aviation
16 const QStringList &CSimBriefData::getLogCategories()
22 CSimBriefData::CSimBriefData() : m_url(
"https://www.simbrief.com/api/xml.fetcher.php") {}
29 if (!m_username.isEmpty()) { url.
setQuery(
"username=" % m_username); }
35 if (index.
isMyself()) {
return QVariant::fromValue(*
this); }
39 case IndexUrl:
return QVariant::fromValue(m_url);
40 case IndexUsername:
return QVariant::fromValue(m_username);
55 case IndexUrl: m_url = variant.toString();
break;
56 case IndexUsername: m_username = variant.toString();
break;
64 return m_username %
" " % m_url;
static const QString & flightPlan()
Flight plan.
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.
Value object for a flight plan.
network::CUrl getUrlAndUsername() const
Get URL plus username.
QString convertToQString(bool i18n=false) const
Cast as QString.
QVariant propertyByIndex(CPropertyIndexRef index) const
Property by index.
void setPropertyByIndex(CPropertyIndexRef index, const QVariant &variant)
Set property by index.
ColumnIndex
Properties by index.
const QString & getUrl() const
Get URL.
CSimBriefData()
Default constructor.
void setPropertyByIndex(CPropertyIndexRef index, const QVariant &variant)
Set property by index.
QVariant propertyByIndex(CPropertyIndexRef index) const
Property by index.
Value object encapsulating information of a location, kind of simplified CValueObject compliant versi...
void setQuery(const QString &query)
Set query.
#define SWIFT_DEFINE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template definition of mixins for a CValueObject subclass.