36 lines
720 B
C++
36 lines
720 B
C++
#include "profession.h"
|
|
|
|
QString Profession::title() const {
|
|
return mTitle;
|
|
}
|
|
|
|
void Profession::setTitle(const QString &newTitle) {
|
|
mTitle = newTitle;
|
|
}
|
|
|
|
PID Profession::pID() const {
|
|
return mPID;
|
|
}
|
|
|
|
Profession Profession::createProfession(const QString &title) {
|
|
Profession p;
|
|
|
|
p.mPID = QUuid::createUuid();
|
|
p.mTitle = title;
|
|
|
|
return p;
|
|
}
|
|
|
|
bool operator==(const Profession &l, const Profession &r) {
|
|
return l.mPID == r.mPID;
|
|
}
|
|
|
|
QDataStream& operator<<(QDataStream &stream, const Profession &prof) {
|
|
stream << prof.mPID << prof.mTitle;
|
|
return stream;
|
|
}
|
|
|
|
QDataStream& operator>>(QDataStream &stream, Profession &prof) {
|
|
stream >> prof.mPID >> prof.mTitle;
|
|
return stream;
|
|
}
|