KPublicTransport::Attribution

Search for usage in LXR

KPublicTransport::Attribution Class Reference

#include <attribution.h>

Properties

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
read

true if there is license information for this attribution object.

Definition at line 41 of file attribution.h.

◆ license

QString KPublicTransport::Attribution::license
readwrite

Name of the license for the provided data.

Definition at line 36 of file attribution.h.

◆ licenseUrl

QUrl KPublicTransport::Attribution::licenseUrl
readwrite

Link to the license or terms and conditions text.

Definition at line 38 of file attribution.h.

◆ name

QString KPublicTransport::Attribution::name
readwrite

Name of the entity providing the data.

Definition at line 32 of file attribution.h.

◆ url

QUrl KPublicTransport::Attribution::url
readwrite

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)
static

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)
static

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)
static

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)
static

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 Fri Oct 11 2024 12:12:54 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.