#ifndef PERSON_H #define PERSON_H #include #include enum class Gender { MALE, FEMALE }; Q_DECLARE_METATYPE(Gender) class Person { public: Person( const QString& firstName, const QString& lastName, const unsigned char age, const Gender gender ) : m_firstName( firstName ), m_lastName( lastName ), m_age( age ), m_gender( gender ) {} const QString& firstName() const { return m_firstName; } const QString& lastName() const { return m_lastName; } int age() const { return m_age; } Gender gender() const { return m_gender; } private: QString m_firstName, m_lastName; unsigned char m_age; Gender m_gender; }; #endif // PERSON_H