Extended user interaction, fixed related problems

This commit is contained in:
E. Kozlovskaya 2021-01-04 00:19:19 +07:00
parent f742061a5e
commit 9bdce6a96b
5 changed files with 118 additions and 22 deletions

View file

@ -0,0 +1,30 @@
#ifndef USERPROFESSION_H
#define USERPROFESSION_H
#include <QDate>
#include "profession.h"
typedef quint8 ProfRank;
class UserProfession {
private:
PID mProfession;
QDate mAcquired;
ProfRank mRank;
public:
UserProfession() = default;
UserProfession(PID pid, ProfRank rank);
PID getProfession() const;
QDate getAcquiredDate() const;
ProfRank getRank() const;
bool setRank(quint8 newRank);
friend bool operator==(const UserProfession &l, const UserProfession &r);
friend QDataStream& operator<<(QDataStream &stream, const UserProfession &up);
friend QDataStream& operator>>(QDataStream &stream, UserProfession &up);
};
#endif // USERPROFESSION_H