Revision 10cc871a
Von Christian Ehringfeld vor mehr als 8 Jahren hinzugefügt
tests/models.h | ||
---|---|---|
#include "../../entitymanager/src/entity.h"
|
||
|
||
using namespace CuteEntityManager;
|
||
class Group;
|
||
class Person: public Entity {
|
||
Q_OBJECT
|
||
Q_PROPERTY(QString firstName READ getFirstName WRITE setFirstName)
|
||
... | ... | |
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)
|
||
Q_PROPERTY(QList<QSharedPointer<Contact>> contacts READ getContacts WRITE
|
||
setContacts)
|
||
Q_PROPERTY(QList<QSharedPointer<Address>> addresses READ
|
||
getAddresses WRITE setAddresses)
|
||
Q_PROPERTY(QList<QSharedPointer<Group>> maintainedGroups READ getMaintainedGroups WRITE setMaintainedGroups)
|
||
|
||
public:
|
||
enum class Gender {MALE, FEMALE, UNKNOWNGENDER};
|
||
... | ... | |
QString customPictureFileName = QString(), QString namePrefix = QString(),
|
||
QString nickName = QString(), QDate birthday = QDate(), QObject *parent = 0);
|
||
|
||
virtual const QHash<QString, CuteEntityManager::Relation> getRelations() const override;
|
||
virtual const QHash<QString, CuteEntityManager::Relation> getRelations() const
|
||
override;
|
||
|
||
bool isPresent(QDateTime date = QDateTime::currentDateTime());
|
||
QString fullName(NameOrder nameOrder = NameOrder::FAMILY_FIRST_NAME_ORDER)
|
||
... | ... | |
QString getCustomPictureFileName() const;
|
||
void setCustomPictureFileName(const QString &value);
|
||
|
||
QList<QSharedPointer<Contact> > getContacts() const;
|
||
void setContacts(const QList<QSharedPointer<Contact> > &value);
|
||
|
||
QList<QSharedPointer<Address> > getAddresses() const;
|
||
void setAddresses(const QList<QSharedPointer<Address> > &value);
|
||
|
||
QList<QSharedPointer<Group> > getGroups() const;
|
||
void setGroups(const QList<QSharedPointer<Group> > &value);
|
||
|
||
void addContact(Contact *contact);
|
||
void addAddress(Address *address);
|
||
|
||
QList<QSharedPointer<Group> > getMaintainedGroups() const;
|
||
void setMaintainedGroups(const QList<QSharedPointer<Group> > &value);
|
||
|
||
protected:
|
||
protected:
|
||
QString firstName;
|
||
QString familyName;
|
||
QString namePrefix;
|
||
... | ... | |
QDate birthday;
|
||
Gender gender;
|
||
QString customPictureFileName;
|
||
QList <QSharedPointer<Contact>> contacts;
|
||
QList <QSharedPointer<Address>> addresses;
|
||
QList <QSharedPointer<Group>> groups;
|
||
QList <QSharedPointer<Group>> maintainedGroups;
|
||
|
||
};
|
||
|
||
class Person;
|
Auch abrufbar als: Unified diff
testing