KGAPI2::People::Relation

Search for usage in LXR

KGAPI2::People::Relation Class Reference

#include <relation.h>

Public Member Functions

 Relation ()
 
 Relation (const Relation &)
 
 Relation (Relation &&) noexcept
 
 ~Relation ()
 
QString formattedType () const
 
FieldMetadata metadata () const
 
bool operator!= (const Relation &) const
 
Relationoperator= (const Relation &)
 
Relationoperator= (Relation &&) noexcept
 
bool operator== (const Relation &) const
 
QString person () const
 
void setMetadata (const FieldMetadata &value)
 
void setPerson (const QString &value)
 
void setType (const QString &value)
 
QJsonValue toJSON () const
 
QString type () const
 

Static Public Member Functions

static Relation fromJSON (const QJsonObject &)
 
static QList< RelationfromJSONArray (const QJsonArray &data)
 

Detailed Description

A person's relation to another person.

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

Definition at line 33 of file relation.h.

Constructor & Destructor Documentation

◆ Relation()

KGAPI2::People::Relation::Relation ( )
explicit

Constructs a new Relation.

Definition at line 50 of file relation.cpp.

◆ ~Relation()

KGAPI2::People::Relation::~Relation ( )
default

Destructor.

Member Function Documentation

◆ formattedType()

QString KGAPI2::People::Relation::formattedType ( ) const
nodiscard

Output only.

The type of the relation translated and formatted in the viewer's account locale or the locale specified in the Accept-Language HTTP header.

Definition at line 89 of file relation.cpp.

◆ fromJSON()

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

Definition at line 103 of file relation.cpp.

◆ fromJSONArray()

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

Definition at line 118 of file relation.cpp.

◆ metadata()

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

Metadata about the relation.

Definition at line 93 of file relation.cpp.

◆ operator!=()

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

Definition at line 66 of file relation.cpp.

◆ operator==()

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

Definition at line 61 of file relation.cpp.

◆ person()

QString KGAPI2::People::Relation::person ( ) const
nodiscard

The name of the other person this relation refers to.

Definition at line 80 of file relation.cpp.

◆ setMetadata()

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

Sets value of the metadata property.

Definition at line 98 of file relation.cpp.

◆ setPerson()

void KGAPI2::People::Relation::setPerson ( const QString & value)

Sets value of the person property.

Definition at line 85 of file relation.cpp.

◆ setType()

void KGAPI2::People::Relation::setType ( const QString & value)

Sets value of the type property.

Definition at line 76 of file relation.cpp.

◆ toJSON()

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

Definition at line 132 of file relation.cpp.

◆ type()

QString KGAPI2::People::Relation::type ( ) const
nodiscard

The person's relation to the other person.

The type can be custom or one of these predefined values: * spouse * child * mother * father * parent * brother * sister * friend * relative * domesticPartner * manager * assistant * referredBy * partner

Definition at line 71 of file relation.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 Mon Nov 4 2024 16:36:14 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.