KGAPI2::People::Photo

Search for usage in LXR

#include <photo.h>

Public Member Functions

 Photo ()
 
 Photo (const Photo &)
 
 Photo (Photo &&) noexcept
 
 ~Photo ()
 
bool isDefault () const
 
FieldMetadata metadata () const
 
bool operator!= (const Photo &) const
 
Photooperator= (const Photo &)
 
Photooperator= (Photo &&) noexcept
 
bool operator== (const Photo &) const
 
void setIsDefault (bool value)
 
void setMetadata (const FieldMetadata &value)
 
void setUrl (const QString &value)
 
QJsonValue toJSON () const
 
QString url () const
 

Static Public Member Functions

static Photo fromJSON (const QJsonObject &)
 
static QList< PhotofromJSONArray (const QJsonArray &data)
 

Detailed Description

A person's photo.

A picture shown next to the person's name to help others recognize the person.

See also
https://developers.google.com/people/api/rest/v1/people#photo
Since
5.23.0

Definition at line 34 of file photo.h.

Constructor & Destructor Documentation

◆ Photo()

KGAPI2::People::Photo::Photo ( )
explicit

Constructs a new Photo.

Definition at line 49 of file photo.cpp.

◆ ~Photo()

KGAPI2::People::Photo::~Photo ( )
default

Destructor.

Member Function Documentation

◆ fromJSON()

Photo KGAPI2::People::Photo::fromJSON ( const QJsonObject & obj)
staticnodiscard

Definition at line 98 of file photo.cpp.

◆ fromJSONArray()

QList< Photo > KGAPI2::People::Photo::fromJSONArray ( const QJsonArray & data)
staticnodiscard

Definition at line 112 of file photo.cpp.

◆ isDefault()

bool KGAPI2::People::Photo::isDefault ( ) const
nodiscard

True if the photo is a default photo; false if the photo is a user-provided photo.

Definition at line 79 of file photo.cpp.

◆ metadata()

FieldMetadata KGAPI2::People::Photo::metadata ( ) const
nodiscard

Metadata about the photo.

Definition at line 70 of file photo.cpp.

◆ operator!=()

bool KGAPI2::People::Photo::operator!= ( const Photo & other) const

Definition at line 65 of file photo.cpp.

◆ operator==()

bool KGAPI2::People::Photo::operator== ( const Photo & other) const

Definition at line 60 of file photo.cpp.

◆ setIsDefault()

void KGAPI2::People::Photo::setIsDefault ( bool value)

Sets value of the isDefault property.

Definition at line 84 of file photo.cpp.

◆ setMetadata()

void KGAPI2::People::Photo::setMetadata ( const FieldMetadata & value)

Sets value of the metadata property.

Definition at line 75 of file photo.cpp.

◆ setUrl()

void KGAPI2::People::Photo::setUrl ( const QString & value)

Sets value of the url property.

Definition at line 93 of file photo.cpp.

◆ toJSON()

QJsonValue KGAPI2::People::Photo::toJSON ( ) const
nodiscard

Definition at line 126 of file photo.cpp.

◆ url()

QString KGAPI2::People::Photo::url ( ) const
nodiscard

The URL of the photo.

You can change the desired size by appending a query parameter sz={size} at the end of the url, where {size} is the size in pixels. Example: https://lh3.googleusercontent.com/-T_wVWLlmg7w/AAAAAAAAAAI/AAAAAAAABa8/00gzXvDBYqw/s100/photo.jpg?sz=50

Definition at line 88 of file photo.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:00:12 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.