You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

20 lines
475 B

#ifndef USLIST_H
#define USLIST_H
#include <QList>
#define US_LIST(TYPE, NAME) \
Q_PROPERTY(QList<TYPE> NAME READ NAME WRITE NAME NOTIFY NAME ## Changed) \
public: \
QList<TYPE> NAME() const { return _ ## NAME; } \
void NAME(QList<TYPE> value) { \
_ ## NAME = value; \
emit NAME ## Changed(value); \
NAME ## Handle(); \
} \
Q_SIGNAL void NAME ## Changed(QList<TYPE> value); \
private: \
QList<TYPE> _ ## NAME; \
void NAME ## Handle();
#endif //USLIST_H