7 using namespace swift::misc::physical_quantities;
12 namespace swift::core::vatsim
14 CReaderSettings::CReaderSettings() {}
16 CReaderSettings::CReaderSettings(
const CTime &initialTime,
const CTime &periodicTime,
bool neverUpdate)
17 : m_initialTime(initialTime), m_periodicTime(periodicTime), m_neverUpdate(neverUpdate)
22 QString s(
"CReaderSettings");
36 if (index.
isMyself()) {
return QVariant::fromValue(*
this); }
42 case IndexNeverUpdate:
return QVariant::fromValue(this->m_neverUpdate);
59 case IndexNeverUpdate: this->m_neverUpdate = variant.toBool();
break;
67 : m_rawFsdMessagesEnabled(enabled), m_FileDir(FileDir)
73 QString s(
"CRawFsdMessageSettings");
74 s.append(
" enabled: ").append(boolToYesNo(m_rawFsdMessagesEnabled));
75 s.append(
" dir: ").append(m_FileDir);
81 if (index.
isMyself()) {
return QVariant::fromValue(*
this); }
85 case IndexRawFsdMessagesEnabled:
return QVariant::fromValue(this->m_rawFsdMessagesEnabled);
86 case IndexFileDir:
return QVariant::fromValue(this->m_FileDir);
87 case IndexFileWriteMode:
return QVariant::fromValue(this->m_fileWriteMode);
102 case IndexRawFsdMessagesEnabled: this->m_rawFsdMessagesEnabled = variant.toBool();
break;
103 case IndexFileDir: this->m_FileDir = variant.toString();
break;
104 case IndexFileWriteMode: this->m_fileWriteMode = variant.value<
FileWriteMode>();
break;
ColumnIndex
Properties by index.
QString convertToQString(bool i18n=false) const
Cast as QString.
QVariant propertyByIndex(swift::misc::CPropertyIndexRef index) const
Property by index.
CRawFsdMessageSettings()
Default constructor.
FileWriteMode
File writing mode.
void setPropertyByIndex(swift::misc::CPropertyIndexRef index, const QVariant &variant)
Set property by index.
Settings used with readers.
void setPropertyByIndex(swift::misc::CPropertyIndexRef index, const QVariant &variant)
Set property by index.
static const CReaderSettings & neverUpdateSettings()
Settings used when a reader is manually triggered and never updates.
QVariant propertyByIndex(swift::misc::CPropertyIndexRef index) const
Property by index.
ColumnIndex
Properties by index.
QString convertToQString(bool i18n=false) const
Cast as QString.
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.
void setPropertyByIndex(CPropertyIndexRef index, const QVariant &variant)
Set property by index.
QVariant propertyByIndex(CPropertyIndexRef index) const
Property by index.
QString convertToQString(bool i18n=false) const
Cast as QString.
void setPropertyByIndex(CPropertyIndexRef index, const QVariant &variant)
Set property by index.
QVariant propertyByIndex(CPropertyIndexRef index) const
Property by index.
Free functions in swift::misc.
#define SWIFT_DEFINE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template definition of mixins for a CValueObject subclass.