mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-10-31 08:09:33 +08:00
22 lines
1.8 KiB
C
22 lines
1.8 KiB
C
|
#ifndef STDAFX_H
|
|||
|
#define STDAFX_H
|
|||
|
|
|||
|
#define Q_PROPERTY_AUTO(TYPE, M) \
|
|||
|
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;
|
|||
|
|
|||
|
#endif // STDAFX_H
|