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
|
#ifndef QLIGTHDM_USER_H
#define QLIGTHDM_USER_H
#include <QtCore/QString>
#include <QtCore/QSharedDataPointer>
class UserPrivate;
namespace QLightDM
{
//public facing User class
/** Class storing user information.
This is an implicitly shared class. */
class Q_DECL_EXPORT User
{
public:
explicit User();
User(const QString &name, const QString &realName, const QString &homeDirectory, const QString &image, bool isLoggedIn);
User(const User& other);
~User();
User &operator=(const User& other);
bool update(const QString &realName, const QString &homeDirectory, const QString &image, bool isLoggedIn);
/** The name to display (the real name if available, otherwise use the username */
QString displayName() const;
/** The username of the user*/
QString name() const;
/** The user's real name, use this for displaying*/
QString realName() const;
/** Returns the home directory of this user*/
QString homeDirectory() const;
/** Returns the path to an avatar of this user*/
QString image() const;
/** Returns true if this user is already logged in on another session*/
bool isLoggedIn() const;
// LdmUser &operator=(const LdmUser user);
private:
QSharedDataPointer<UserPrivate> d;
};
}
#endif // LDMUSER_H
|