Go to the source code of this file.
◆ API_PROPERTY
#define API_PROPERTY |
( |
|
name, |
|
|
|
pid |
|
) |
| |
Value:Q_PROPERTY(QVariant name READ get_##name WRITE set_##name) \
QVariant get_##name() const { return get(Ms::Pid::pid); } \
void set_##name(QVariant val) { set(Ms::Pid::pid, val); }
◆ API_PROPERTY_READ_ONLY
#define API_PROPERTY_READ_ONLY |
( |
|
name, |
|
|
|
pid |
|
) |
| |
Value:Q_PROPERTY(QVariant name READ get_##name) \
QVariant get_##name() const { return get(Ms::Pid::pid); }
◆ API_PROPERTY_READ_ONLY_T
#define API_PROPERTY_READ_ONLY_T |
( |
|
type, |
|
|
|
name, |
|
|
|
pid |
|
) |
| |
Value:Q_PROPERTY(type name READ get_##name) \
type get_##name() const { return get(Ms::Pid::pid).value<type>(); } \
◆ API_PROPERTY_T
#define API_PROPERTY_T |
( |
|
type, |
|
|
|
name, |
|
|
|
pid |
|
) |
| |
Value:Q_PROPERTY(type name READ get_##name WRITE set_##name) \
type get_##name() const { return get(Ms::Pid::pid).value<type>(); } \
void set_##name(type val) { set(Ms::Pid::pid, QVariant::fromValue(val)); }
API_PROPERTY flavor which allows to define the property type.
Can be used if it is known that this property is always valid for this type, otherwise this macro won't allow an undefined
value to be exposed to QML in case of invalid property.