forked from jfnavarro/st_viewer
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathUser.h
More file actions
executable file
·81 lines (68 loc) · 2.09 KB
/
User.h
File metadata and controls
executable file
·81 lines (68 loc) · 2.09 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/*
Copyright (C) 2012 Spatial Transcriptomics AB,
read LICENSE for licensing terms.
Contact : Jose Fernandez Navarro <jose.fernandez.navarro@scilifelab.se>
*/
#ifndef USER_H
#define USER_H
#include <QString>
#include <QVector>
// Data model class to store user data.
class User
{
public:
User();
explicit User(const User& other);
~User();
User& operator=(const User& other);
bool operator==(const User& other) const;
const QString id() const;
const QString username() const;
const QString institution() const;
const QString firstName() const;
const QString secondName() const;
const QString address() const;
int postcode() const;
const QString city() const;
const QString country() const;
const QString password() const;
const QString role() const;
bool enabled() const;
const QVector<QString> grantedDatasets() const;
const QString created() const;
const QString lastModified() const;
void id(const QString& id);
void username(const QString& username);
void institution(const QString& institution);
void firstName(const QString& firstName);
void secondName(const QString& secondName);
void address(const QString& address);
void postcode(int postCode);
void city(const QString& city);
void country(const QString& country);
void password(const QString& password);
void role(const QString& role);
void enabled(bool enabled);
void grantedDatasets(const QVector<QString> &grantedDatasets);
void created(const QString& created);
void lastModified(const QString& lastModified);
//property to indicate if the user has a special role (CM or ADMIN)
bool hasSpecialRole() const;
private:
QString m_id;
QString m_username;
QString m_instituion;
QString m_firstName;
QString m_secondName;
QString m_address;
int m_postcode;
QString m_city;
QString m_country;
QString m_password;
QString m_role;
bool m_enabled;
QVector<QString> m_grantedDatasets;
QString m_created;
QString m_lastMofidied;
};
#endif // USER_H