-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuserinfo.h
75 lines (57 loc) · 1.54 KB
/
userinfo.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
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
#ifndef USERDETAILS_H
#define USERDETAILS_H
#include <QObject>
#include <QUrl>
#include "PastebinAPI.h"
class WIIKING2_EXPORT UserInfo : public QObject
{
Q_OBJECT
public:
enum Visibility
{
Public,
Unlisted,
Private
};
enum AccountType
{
Normal,
Pro
};
explicit UserInfo(QObject *parent = 0);
QString userName() const;
void setUserName(const QString& userName);
QString shortFormat() const;
void setShortFormat(const QString& format);
QString expiration() const;
void setExpiration(const QString& expire);
QUrl avatarUrl() const;
void setAvatarUrl(const QUrl& url);
Visibility visibility() const;
void setVisibility(Visibility visibility);
QUrl website() const;
void setWebsite(const QUrl& website);
QString email() const;
void setEmail(const QString& email);
QString location() const;
void setLocation(const QString& location);
AccountType accountType() const;
void setAccountType(AccountType type);
static UserInfo* fromData(const QByteArray& data);
signals:
public slots:
private:
QString m_userName;
QString m_shortFormat;
QString m_expiration;
QUrl m_avatarUrl;
Visibility m_visibility;
QUrl m_website;
QString m_email;
QString m_location;
AccountType m_accountType;
};
#ifndef QT_NO_DEBUG_STREAM
WIIKING2_EXPORT QDebug operator<<(QDebug debug, const UserInfo* userinfo);
#endif // QT_NO_DEBUG_STREAM
#endif // USERDETAILS_H