Revision c8192ee9
Von Christian Ehringfeld vor mehr als 9 Jahren hinzugefügt
| samples/validators/person.h | ||
|---|---|---|
|
|
||
|
public:
|
||
|
enum class Gender {MALE, FEMALE, UNKNOWNGENDER};
|
||
|
Q_ENUM(Gender)
|
||
|
enum class NameOrder {FIRST_FAMILY_NAME_ORDER, FAMILY_FIRST_NAME_ORDER};
|
||
|
|
||
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
|
||
|
Q_ENUM(Gender)
|
||
|
Q_ENUM(NameOrder)
|
||
|
#else
|
||
|
Q_ENUMS(Gender)
|
||
|
Q_ENUMS(NameOrder)
|
||
|
#endif
|
||
|
Q_INVOKABLE explicit Person(QObject *parent = 0);
|
||
|
Person(QString firstName, QString familyName,
|
||
|
Gender gender = Gender::UNKNOWNGENDER,
|
||
| ... | ... | |
|
QString getCustomPictureFileName() const;
|
||
|
void setCustomPictureFileName(const QString &value);
|
||
|
|
||
|
QList<QSharedPointer<Address> > getAddresses() const;
|
||
|
void setAddresses(const QList<QSharedPointer<Address> > &value);
|
||
|
QList<QSharedPointer<Address>> getAddresses() const;
|
||
|
void setAddresses(const QList<QSharedPointer<Address>> &value);
|
||
|
|
||
|
void addAddress(Address *address);
|
||
|
|
||
| tests/models.h | ||
|---|---|---|
|
|
||
|
public:
|
||
|
enum class Gender {MALE, FEMALE, UNKNOWNGENDER};
|
||
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
|
||
|
Q_ENUM(Gender)
|
||
|
#else
|
||
|
Q_ENUMS(Gender)
|
||
|
#endif
|
||
|
enum class NameOrder {FIRST_FAMILY_NAME_ORDER, FAMILY_FIRST_NAME_ORDER};
|
||
|
Q_INVOKABLE explicit Person(QObject *parent = 0);
|
||
|
Person(QString firstName, QString familyName,
|
||
| ... | ... | |
|
setWorkers)
|
||
|
public:
|
||
|
WorkerGroup() : Entity() { }
|
||
|
WorkerGroup(QString name, quint32 efficiency, bool active=true) : Entity() {
|
||
|
WorkerGroup(QString name, quint32 efficiency, bool active = true) : Entity() {
|
||
|
this->name = name;
|
||
|
this->efficiency = efficiency;
|
||
|
this->active = active;
|
||
Auch abrufbar als: Unified diff
qt 5.3 comp