7#include "locationqueryresult.h"
16class LocationQueryResult::LocationQueryResultPrivate
19 double latitude, longitude;
20 QString toponymName, name, countryCode, geonameId;
21 std::optional<QString> subdivision;
23LocationQueryResult::LocationQueryResult()
24 : d(std::make_unique<LocationQueryResultPrivate>())
27LocationQueryResult::LocationQueryResult(LocationQueryResult &&other)
noexcept =
default;
28LocationQueryResult::LocationQueryResult(
double latitude,
34 std::optional<QString> subdivision)
35 : d(std::make_unique<LocationQueryResultPrivate>())
37 d->latitude = latitude;
38 d->longitude = longitude;
39 d->toponymName = std::move(toponymName);
40 d->name = std::move(name);
41 d->countryCode = std::move(countryCode);
42 d->geonameId = std::move(geonameId);
46 : d(std::make_unique<LocationQueryResultPrivate>())
50LocationQueryResult::~LocationQueryResult() =
default;
51LocationQueryResult &LocationQueryResult::operator=(
const LocationQueryResult &other)
56LocationQueryResult &LocationQueryResult::operator=(LocationQueryResult &&other)
noexcept =
default;
57double LocationQueryResult::latitude()
const
61double LocationQueryResult::longitude()
const
65const QString &LocationQueryResult::toponymName()
const
67 return d->toponymName;
69const QString &LocationQueryResult::name()
const
73const QString &LocationQueryResult::countryCode()
const
75 return d->countryCode;
77QString LocationQueryResult::countryName()
const
81const QString &LocationQueryResult::geonameId()
const
87 return d->subdivision;
91#include "moc_locationqueryresult.cpp"
static KCountry fromAlpha2(const char *alpha2Code)
Class represents location query result.
const std::optional< QString > & subdivision() const
Country subdivision such as state, province, etc.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:00:29 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.