-
Notifications
You must be signed in to change notification settings - Fork 0
/
user.h
49 lines (41 loc) · 1.07 KB
/
user.h
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
40
41
42
43
44
45
46
47
48
49
/**
* @file user.h
* @brief this class stores user's credential including: username, status (online/offline)
* @author Giang Nguyen
* Contact: [email protected]
*/
#ifndef USER_H
#define USER_H
#include <QObject>
#include <QString>
class User : public QObject
{
Q_OBJECT
public:
explicit User(QObject *parent = nullptr);
/**
* @brief setUsername save the username
* @param username a string storing the username
*/
void setUsername(QString username);
/**
* @brief setStatus change user's status
* @param isOnline a boolean storing user's status: true or false, corresponding to online or offline
*/
void setStatus(bool isOnline);
/**
* @brief checkStatus
* @return return user's status
*/
bool checkStatus();
private:
/**
* @param username store the username
*/
QString username;
/**
* @param isOnline store user's status
*/
bool isOnline;
};
#endif // USER_H