2023-05-22 16:17:51 +08:00
|
|
|
#ifndef STDAFX_H
|
2023-02-26 23:47:07 +08:00
|
|
|
#define STDAFX_H
|
|
|
|
|
|
|
|
#define Q_PROPERTY_AUTO(TYPE, M) \
|
2024-01-17 14:00:20 +08:00
|
|
|
Q_PROPERTY(TYPE M MEMBER _##M NOTIFY M##Changed) \
|
|
|
|
public: \
|
|
|
|
Q_SIGNAL void M##Changed(); \
|
|
|
|
void M(TYPE in_##M) \
|
|
|
|
{ \
|
|
|
|
_##M = in_##M; \
|
|
|
|
Q_EMIT M##Changed(); \
|
|
|
|
} \
|
|
|
|
TYPE M() \
|
|
|
|
{ \
|
|
|
|
return _##M; \
|
|
|
|
} \
|
|
|
|
private: \
|
|
|
|
TYPE _##M; \
|
|
|
|
|
|
|
|
|
|
|
|
#define Q_PROPERTY_READONLY_AUTO(TYPE, M) \
|
|
|
|
Q_PROPERTY(TYPE M READ M NOTIFY M##Changed FINAL) \
|
|
|
|
public: \
|
|
|
|
Q_SIGNAL void M##Changed(); \
|
|
|
|
void M(TYPE in_##M) \
|
|
|
|
{ \
|
|
|
|
_##M = in_##M; \
|
|
|
|
Q_EMIT M##Changed(); \
|
|
|
|
} \
|
|
|
|
TYPE M() \
|
|
|
|
{ \
|
|
|
|
return _##M; \
|
|
|
|
} \
|
|
|
|
private: \
|
|
|
|
TYPE _##M; \
|
2023-02-26 23:47:07 +08:00
|
|
|
|
|
|
|
#endif // STDAFX_H
|