Search for usage in LXR

KPublicTransport::Attribution Class Reference

#include <attribution.h>


bool hasLicense
QString license
QUrl licenseUrl
QString name
QUrl url

Public Member Functions

bool hasLicense () const
bool isEmpty () const

Static Public Member Functions

static std::vector< AttributionfromJson (const QJsonArray &a)
static Attribution fromJson (const QJsonObject &obj)
static QJsonObject toJson (const Attribution &attr)
static QJsonArray toJson (const std::vector< Attribution > &attrs)

Detailed Description

Copyright and license information about the provided data.

Should be displayed by the application in order to comply with licenses and/or terms and conditions of the data providers.

Definition at line 28 of file attribution.h.

Property Documentation

◆ hasLicense

bool KPublicTransport::Attribution::hasLicense

true if there is license information for this attribution object.

Definition at line 41 of file attribution.h.

◆ license

QString KPublicTransport::Attribution::license

Name of the license for the provided data.

Definition at line 36 of file attribution.h.

◆ licenseUrl

QUrl KPublicTransport::Attribution::licenseUrl

Link to the license or terms and conditions text.

Definition at line 38 of file attribution.h.

◆ name

QString KPublicTransport::Attribution::name

Name of the entity providing the data.

Definition at line 32 of file attribution.h.

◆ url

QUrl KPublicTransport::Attribution::url

Link to the entity providing the data.

Definition at line 34 of file attribution.h.

Member Function Documentation

◆ fromJson() [1/2]

std::vector< Attribution > Attribution::fromJson ( const QJsonArray & a)

Dezerializes an array of Attribution objects from JSON.

Definition at line 43 of file attribution.cpp.

◆ fromJson() [2/2]

Attribution Attribution::fromJson ( const QJsonObject & obj)

Deserialize an Attribution object from JSON.

Definition at line 48 of file attribution.cpp.

◆ hasLicense()

bool Attribution::hasLicense ( ) const

Definition at line 38 of file attribution.cpp.

◆ isEmpty()

bool Attribution::isEmpty ( ) const

Returns true if this is an empty or default-constructed Attribution object.

Definition at line 33 of file attribution.cpp.

◆ toJson() [1/2]

QJsonObject Attribution::toJson ( const Attribution & attr)

Serializes one Attribution object to JSON.

Definition at line 68 of file attribution.cpp.

◆ toJson() [2/2]

QJsonArray Attribution::toJson ( const std::vector< Attribution > & attrs)

Serializes an array of Attribution objects to JSON.

Definition at line 63 of file attribution.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 Tue Mar 26 2024 11:13:06 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.