7 #include <QStringBuilder>
12 namespace swift::misc::network
25 if (IDatastoreObjectWithIntegerKey::canHandleIndex(index))
27 return IDatastoreObjectWithIntegerKey::propertyByIndex(index);
46 if (IDatastoreObjectWithIntegerKey::canHandleIndex(index))
48 IDatastoreObjectWithIntegerKey::setPropertyByIndex(index, variant);
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.
ColumnIndex
Property index.
void setDbKey(int key)
Set the DB key.
QString getDbKeyAsStringInParentheses(const QString &prefix={}) const
Db key in parentheses, e.g. "(3)".
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.
static CRole fromDatabaseJson(const QJsonObject &json)
Role from DB JSON.
CRole()=default
Constructor.
QVariant propertyByIndex(swift::misc::CPropertyIndexRef index) const
Property by index.
void setName(const QString &name)
Name.
void setPropertyByIndex(swift::misc::CPropertyIndexRef index, const QVariant &variant)
Set property by index.
void setDescription(const QString &description)
Description.
QJsonValue value(QLatin1StringView key) const const
int toInt(int defaultValue) const const
QString toString() const const
QVariant fromValue(T &&value)
#define SWIFT_DEFINE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template definition of mixins for a CValueObject subclass.