-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuser.cpp
More file actions
39 lines (30 loc) · 752 Bytes
/
Copy pathuser.cpp
File metadata and controls
39 lines (30 loc) · 752 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include "user.h"
#include <QDebug>
User::User(const QString& initUsername,const int& userID,const QString &fName,const QString& lName) : firstName(fName),lastName(lName),username(initUsername),ID(userID)
{
}
QString User::getUsername() const{
return username;
}
int User::setFirstName(const QString& firstName){
this->firstName = firstName;
}
int User::setLastName(const QString& lastName) {
this->lastName = lastName;
}
QString User::getFirstName() const{
return firstName;
}
QString User::getLastName () const{
return lastName;
}
int User::getID() const{
return ID;
}
int User::setID(const int& newID){
ID = newID;
return 1;
}
bool User::operator==(const User& other){
return other.getID() == getID();
}