Revision da565582
Von Christian Ehringfeld vor fast 9 Jahren hinzugefügt
samples/example/models/person.h | ||
---|---|---|
Q_PROPERTY(QDate birthday READ getBirthday WRITE setBirthday)
|
||
Q_PROPERTY(Gender gender READ getGender WRITE setGender)
|
||
Q_PROPERTY(QList<QSharedPointer<Group>> groups READ getGroups WRITE setGroups)
|
||
Q_PROPERTY(QList<QSharedPointer<Group>> maintainedGroups READ
|
||
getMaintainedGroups WRITE setMaintainedGroups)
|
||
|
||
public:
|
||
enum class Gender {MALE, FEMALE, UNKNOWNGENDER};
|
||
... | ... | |
void addContact(Contact *contact);
|
||
void addAddress(Address *address);
|
||
|
||
QList<QSharedPointer<Group> > getMaintainedGroups() const;
|
||
void setMaintainedGroups(const QList<QSharedPointer<Group> > &value);
|
||
|
||
protected:
|
||
QString firstName;
|
||
QString familyName;
|
||
... | ... | |
QList <QSharedPointer<Contact>> contacts;
|
||
QList <QSharedPointer<Address>> addresses;
|
||
QList <QSharedPointer<Group>> groups;
|
||
QList <QSharedPointer<Group>> maintainedGroups;
|
||
};
|
||
|
||
|
Auch abrufbar als: Unified diff
small update