-
Notifications
You must be signed in to change notification settings - Fork 13
/
googleaccount.h
34 lines (26 loc) · 1.21 KB
/
googleaccount.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
#ifndef GOOGLEACCOUNT_H
#define GOOGLEACCOUNT_H
#include <QObject>
class GoogleAccount : public QObject {
Q_OBJECT
Q_PROPERTY(QString accountIdentifier READ accountIdentifier WRITE setAccountIdentifier NOTIFY stateChanged)
Q_PROPERTY(QString accountUserId READ accountUserId WRITE setAccountUserId NOTIFY stateChanged)
Q_PROPERTY(QString accountToken READ accountToken WRITE setAccountToken NOTIFY stateChanged)
private:
QString m_accountIdentifier;
QString m_accountUserId;
QString m_accountToken;
public:
QString const& accountIdentifier() const { return m_accountIdentifier; }
QString const& accountUserId() const { return m_accountUserId; }
QString const& accountToken() const { return m_accountToken; }
void setAccountIdentifier(QString const& value) { m_accountIdentifier = value; stateChanged(); }
void setAccountUserId(QString const& value) { m_accountUserId = value; stateChanged(); }
void setAccountToken(QString const& value) { m_accountToken = value; stateChanged(); }
bool isValid() {
return m_accountIdentifier.size() > 0 && m_accountUserId.size()> 0 && m_accountToken.size() > 0;
}
signals:
void stateChanged();
};
#endif // GOOGLEACCOUNT_H