9#include "accountinfo.h"
12#include <QJsonDocument>
22 Private(
const Private &other);
38 bool verifiedEmail =
false;
43AccountInfo::Private::Private()
47AccountInfo::Private::Private(
const Private &other)
59 , pictureUrl(other.pictureUrl)
63AccountInfo::Private::~Private()
75 , d(new Private(*(other.d)))
84bool AccountInfo::operator==(
const AccountInfo &other)
const
86 if (!Object::operator==(other)) {
100 GAPI_COMPARE(pictureUrl)
151 return d->familyName;
211 return d->verifiedEmail;
221 return d->pictureUrl;
235 accountInfo->setId(data.value(QStringLiteral(
"id")).toString());
236 accountInfo->setEmail(data.value(QStringLiteral(
"email")).toString());
237 accountInfo->setName(data.value(QStringLiteral(
"name")).toString());
238 accountInfo->setGivenName(data.value(QStringLiteral(
"given_name")).toString());
239 accountInfo->setFamilyName(data.value(QStringLiteral(
"family_name")).toString());
240 accountInfo->setBirthday(data.value(QStringLiteral(
"birthday")).toString());
241 accountInfo->setGender(data.value(QStringLiteral(
"gender")).toString());
242 accountInfo->setLink(data.value(QStringLiteral(
"link")).toString());
243 accountInfo->setLocale(data.value(QStringLiteral(
"locale")).toString());
244 accountInfo->setTimezone(data.value(QStringLiteral(
"timezone")).toString());
245 accountInfo->setPhotoUrl(data.value(QStringLiteral(
"picture")).toString());
246 accountInfo->setVerifiedEmail(data.value(QStringLiteral(
"verified_email")).toBool());
AccountInfo contains information about user's Google account.
void setLink(const QString &link)
Sets link to user's profile.
QString link() const
Returns link to user's profile.
void setFamilyName(const QString &familyName)
Sets user's family name (surname).
void setEmail(const QString &email)
Sets account email.
void setPhotoUrl(const QString &url)
Sets URL of user's photo.
void setVerifiedEmail(bool verified)
Sets whether the email address is verified.
QString email() const
Returns account email address.
void setLocale(const QString &locale)
Sets users locale settings.
void setGender(const QString &gender)
Sets user's gender.
AccountInfo()
Constructor.
QString name() const
Returns user's real full name.
QString givenName() const
Returns user's given name.
QString familyName() const
Returns user's surname.
void setBirthday(const QString &birthday)
Sets user's birthday.
void setId(const QString &id)
Sets an account ID.
void setGivenName(const QString &givenName)
Sets user's given name.
QString gender() const
Returns user's gender.
QString id() const
Returns account ID.
void setTimezone(const QString &timezone)
Sets user's timezone name.
void setName(const QString &name)
Sets user's real full name.
QString photoUrl() const
Returns URL of user's photo.
static AccountInfoPtr fromJSON(const QByteArray &jsonData)
Parses raw JSON data into AccountInfo object.
bool verifiedEmail() const
Returns whether the email is verified.
~AccountInfo() override
destructor
QString locale() const
Returns user's preferred locales.
QString timezone() const
Returns name of user's timezone.
QString birthday() const
Returns user's birthday.
Base class for all objects.
A job to fetch a single map tile described by a StaticMapUrl.
QString name(GameStandardAction id)
KIOCORE_EXPORT CopyJob * link(const QList< QUrl > &src, const QUrl &destDir, JobFlags flags=DefaultFlags)
QJsonDocument fromJson(const QByteArray &json, QJsonParseError *error)
bool isNull() const const
QVariant toVariant() const const
QMap< QString, QVariant > toMap() const const