8#include "assetrepository_p.h"
9#include "backends/srbijavozbackend.h"
10#include "journeyreply.h"
11#include "journeyrequest.h"
12#include "requestcontext_p.h"
13#include "locationreply.h"
14#include "locationrequest.h"
16#include "stopoverreply.h"
17#include "stopoverrequest.h"
18#include "vehiclelayoutrequest.h"
19#include "vehiclelayoutreply.h"
20#include "datatypes/attributionutil_p.h"
21#include "datatypes/backend.h"
22#include "datatypes/backend_p.h"
23#include "datatypes/disruption.h"
24#include "datatypes/json_p.h"
25#include "geo/geojson_p.h"
27#include <KPublicTransport/Journey>
28#include <KPublicTransport/Location>
29#include <KPublicTransport/Stopover>
31#include "backends/accessibilitycloudbackend.h"
32#include "backends/cache.h"
33#include "backends/deutschebahnbackend.h"
34#include "backends/efabackend.h"
35#include "backends/hafasmgatebackend.h"
36#include "backends/hafasquerybackend.h"
37#include "backends/ivvassbackend.h"
38#include "backends/motisbackend.h"
39#include "backends/motis2backend.h"
40#include "backends/navitiabackend.h"
41#include "backends/oebbbackend.h"
42#include "backends/openjourneyplannerbackend.h"
43#include "backends/opentripplannergraphqlbackend.h"
44#include "backends/opentripplannerrestbackend.h"
45#include "backends/ltglinkbackend.h"
46#include "gbfs/gbfsbackend.h"
48#include <QCoreApplication>
49#include <QDirIterator>
51#include <QJsonDocument>
53#include <QMetaProperty>
54#include <QNetworkAccessManager>
55#include <QStandardPaths>
64static inline void initResources() {
65 Q_INIT_RESOURCE(asset_attributions);
66 Q_INIT_RESOURCE(gbfs);
67 Q_INIT_RESOURCE(geometry);
68 Q_INIT_RESOURCE(images);
69 Q_INIT_RESOURCE(networks);
70 Q_INIT_RESOURCE(network_certs);
72 Q_INIT_RESOURCE(stations);
80 [[nodiscard]] std::unique_ptr<AbstractBackend> loadNetwork(
const QJsonObject &obj);
81 template <
typename Backend,
typename Backend2,
typename ...Backends>
82 [[nodiscard]]
static std::unique_ptr<AbstractBackend> loadNetwork(
const QJsonObject &backendType,
const QJsonObject &obj);
83 template <
typename Backend>
84 [[nodiscard]]
static std::unique_ptr<AbstractBackend> loadNetwork(
const QJsonObject &backendType,
const QJsonObject &obj);
86 [[nodiscard]]
static std::unique_ptr<AbstractBackend> loadNetwork(
const QJsonObject &obj);
88 template <
typename RequestT>
89 [[nodiscard]]
bool shouldSkipBackend(
const Backend &backend,
const RequestT &req)
const;
91 void resolveLocation(
LocationRequest &&locReq,
const AbstractBackend *backend,
const std::function<
void(
const Location &loc)> &callback);
95 template <
typename RepT,
typename ReqT>
96 [[nodiscard]] RepT* makeReply(
const ReqT &request);
98 void readCachedAttributions();
104 std::vector<Backend> m_backends;
105 std::vector<Attribution> m_attributions;
111 bool m_allowInsecure =
false;
112 bool m_hasReadCachedAttributions =
false;
113 bool m_backendsEnabledByDefault =
true;
116 [[nodiscard]]
bool shouldSkipBackend(
const Backend &backend)
const;
132void ManagerPrivate::loadNetworks()
134 if (!m_backends.empty()) {
144 std::vector<Attribution> attributions;
145 for (
const auto &searchDir : searchDirs) {
147 while (it.hasNext()) {
149 const auto id = it.fileInfo().baseName();
150 if (std::any_of(m_backends.begin(), m_backends.end(), [&
id](
const auto &backend) { return backend.identifier() == id; })) {
155 QFile f(it.filePath());
157 qCWarning(
Log) <<
"Failed to open public transport network configuration:" << f.errorString();
164 qCWarning(
Log) <<
"Failed to parse public transport network configuration:" <<
error.errorString() << it.fileName();
168 auto net = loadNetwork(doc.object());
170 net->setBackendId(
id);
172 if (!net->attribution().isEmpty()) {
173 attributions.push_back(net->attribution());
176 auto b = BackendPrivate::fromJson(doc.object());
177 BackendPrivate::setImpl(b, std::move(net));
178 m_backends.push_back(std::move(b));
180 qCWarning(
Log) <<
"Failed to load public transport network configuration config:" << it.fileName();
185 std::stable_sort(m_backends.begin(), m_backends.end(), [](
const auto &lhs,
const auto &rhs) {
186 return lhs.identifier() < rhs.identifier();
189 AttributionUtil::sort(attributions);
190 if (m_attributions.empty()) {
192 m_attributions = std::move(attributions);
195 AttributionUtil::merge(m_attributions, attributions);
198 qCDebug(
Log) << m_backends.size() <<
"public transport network configurations loaded";
201std::unique_ptr<AbstractBackend> ManagerPrivate::loadNetwork(
const QJsonObject &obj)
207 OpenTripPlannerGraphQLBackend,
208 OpenTripPlannerRestBackend,
215 OpenJourneyPlannerBackend,
219 AccessibilityCloudBackend,
225template <
typename Backend,
typename Backend2,
typename ...Backends>
226std::unique_ptr<AbstractBackend> ManagerPrivate::loadNetwork(
const QJsonObject &backendType,
const QJsonObject &obj)
229 return loadNetwork<Backend>(obj);
231 return loadNetwork<Backend2, Backends...>(backendType, obj);
234template <
typename Backend>
235std::unique_ptr<AbstractBackend> ManagerPrivate::loadNetwork(
const QJsonObject &backendType,
const QJsonObject &obj)
238 return ManagerPrivate::loadNetwork<Backend>(obj);
240 qCWarning(
Log) <<
"Unknown backend type:" << backendType;
247 for (
auto it = opts.begin(); it != opts.end(); ++it) {
250 qCWarning(
Log) <<
"Unknown backend setting:" << it.key();
254 if (it.value().isObject()) {
255 mp.writeOnGadget(backend, it.value().toObject());
256 }
else if (it.value().isArray()) {
257 const auto a = it.value().toArray();
261 std::transform(a.begin(), a.end(), std::back_inserter(l), [](
const auto &v) { return v.toString(); });
262 mp.writeOnGadget(backend, l);
264 mp.writeOnGadget(backend, it.value().toArray());
267 mp.writeOnGadget(backend, it.value().toVariant());
273 backend->setAttribution(attr);
276 if (!tzId.isEmpty()) {
279 backend->setTimeZone(tz);
281 qCWarning(
Log) <<
"Invalid timezone:" << tzId;
285 const auto langArray = obj.
value(
"supportedLanguages"_L1).
toArray();
287 langs.
reserve(langArray.size());
288 std::transform(langArray.begin(), langArray.end(), std::back_inserter(langs), [](
const auto &v) { return v.toString(); });
289 backend->setSupportedLanguages(langs);
292template<
typename T> std::unique_ptr<AbstractBackend> ManagerPrivate::loadNetwork(
const QJsonObject &obj)
294 std::unique_ptr<AbstractBackend> backend(
new T);
295 applyBackendOptions(backend.get(), &T::staticMetaObject, obj);
299bool ManagerPrivate::shouldSkipBackend(
const Backend &backend)
const
301 if (!backend.
isSecure() && !m_allowInsecure) {
302 qCDebug(
Log) <<
"Skipping insecure backend:" << backend.
identifier();
308template <
typename RequestT>
309bool ManagerPrivate::shouldSkipBackend(
const Backend &backend,
const RequestT &req)
const
311 if (!req.backendIds().isEmpty() && !req.backendIds().contains(backend.
identifier())) {
315 return shouldSkipBackend(backend);
320void ManagerPrivate::resolveLocation(
LocationRequest &&locReq,
const AbstractBackend *backend,
const std::function<
void(
const Location&)> &callback)
323 locReq.setMaximumResults(1);
326 const auto cacheEntry = Cache::lookupLocation(backend->backendId(), locReq.cacheKey());
327 switch (cacheEntry.type) {
328 case CacheHitType::Negative:
331 case CacheHitType::Positive:
332 if (!cacheEntry.data.empty()) {
333 const auto loc = cacheEntry.data[0];
338 case CacheHitType::Miss:
344 if (backend->queryLocation(locReq, locReply, nam())) {
345 locReply->setPendingOps(1);
347 locReply->setPendingOps(0);
350 locReply->deleteLater();
351 if (locReply->result().empty()) {
354 callback(locReply->result()[0]);
362 if (req.
modes() & JourneySection::PublicTransport) {
373 auto cache = Cache::lookupJourney(backend->backendId(), req.
cacheKey());
374 switch (cache.type) {
375 case CacheHitType::Negative:
376 qCDebug(
Log) <<
"Negative cache hit for backend" << backend->backendId();
378 case CacheHitType::Positive:
379 qCDebug(
Log) <<
"Positive cache hit for backend" << backend->backendId();
380 reply->addAttributions(std::move(cache.attributions));
381 reply->addResult(backend, std::move(cache.data));
383 case CacheHitType::Miss:
384 qCDebug(
Log) <<
"Cache miss for backend" << backend->backendId();
389 if (backend->needsLocationQuery(req.
from(), AbstractBackend::QueryType::Journey)) {
391 fromReq.setTypes(locationTypesForJourneyRequest(req));
392 resolveLocation(std::move(fromReq), backend, [reply, backend, req,
this](
const Location &loc) {
393 auto jnyRequest = req;
395 jnyRequest.setFrom(fromLoc);
397 if (backend->needsLocationQuery(jnyRequest.to(), AbstractBackend::QueryType::Journey)) {
399 toReq.setTypes(locationTypesForJourneyRequest(req));
400 resolveLocation(std::move(toReq), backend, [jnyRequest, reply, backend,
this](
const Location &loc) {
401 auto jnyReq = jnyRequest;
404 if (!backend->queryJourney(jnyReq, reply, nam())) {
412 if (!backend->queryJourney(jnyRequest, reply, nam())) {
420 if (backend->needsLocationQuery(req.
to(), AbstractBackend::QueryType::Journey)) {
422 toReq.setTypes(locationTypesForJourneyRequest(req));
423 resolveLocation(std::move(toReq), backend, [req, toReq, reply, backend,
this](
const Location &loc) {
425 auto jnyRequest = req;
426 jnyRequest.setTo(toLoc);
427 if (!backend->queryJourney(jnyRequest, reply, nam())) {
434 return backend->queryJourney(req, reply, nam());
439 auto cache = Cache::lookupStopover(backend->backendId(), req.
cacheKey());
440 switch (cache.type) {
441 case CacheHitType::Negative:
442 qCDebug(
Log) <<
"Negative cache hit for backend" << backend->backendId();
444 case CacheHitType::Positive:
445 qCDebug(
Log) <<
"Positive cache hit for backend" << backend->backendId();
446 reply->addAttributions(std::move(cache.attributions));
447 reply->addResult(backend, std::move(cache.data));
449 case CacheHitType::Miss:
450 qCDebug(
Log) <<
"Cache miss for backend" << backend->backendId();
455 if (backend->needsLocationQuery(req.
stop(), AbstractBackend::QueryType::Departure)) {
456 qCDebug(
Log) <<
"Backend needs location query first:" << backend->backendId();
459 locReq.setMaximumDistance(250);
460 resolveLocation(std::move(locReq), backend, [reply, req, backend,
this](
const Location &loc) {
462 auto depRequest = req;
463 depRequest.setStop(depLoc);
464 if (!backend->queryStopover(depRequest, reply, nam())) {
471 return backend->queryStopover(req, reply, nam());
474void ManagerPrivate::readCachedAttributions()
476 if (m_hasReadCachedAttributions) {
480 Cache::allCachedAttributions(m_attributions);
481 m_hasReadCachedAttributions =
true;
484template<
typename RepT,
typename ReqT>
485RepT* ManagerPrivate::makeReply(
const ReqT &request)
487 auto reply =
new RepT(request, q);
489 AttributionUtil::merge(m_attributions, reply->
attributions());
496Manager::Manager(
QObject *parent)
498 , d(new ManagerPrivate)
501 qRegisterMetaType<Disruption::Effect>();
504 if (!AssetRepository::instance()) {
505 auto assetRepo =
new AssetRepository(
this);
506 assetRepo->setNetworkAccessManagerProvider(std::bind(&ManagerPrivate::nam, d.get()));
514Manager::~Manager() =
default;
518 if (d->m_nam == nam) {
522 if (d->m_nam && d->m_nam->parent() ==
this) {
529bool Manager::allowInsecureBackends()
const
531 return d->m_allowInsecure;
534void Manager::setAllowInsecureBackends(
bool insecure)
536 if (d->m_allowInsecure == insecure) {
539 d->m_allowInsecure = insecure;
540 Q_EMIT configurationChanged();
552 reply->setPendingOps(pendingOps);
559 if (req.contexts().empty()) {
561 bool foundNonGlobalCoverage =
false;
562 for (
const auto coverageType : { CoverageArea::Realtime, CoverageArea::Regular, CoverageArea::Any }) {
563 const auto checkBackend = [&](
const Backend &backend,
bool bothLocationMatch) {
564 if (triedBackends.
contains(backend.
identifier()) || d->shouldSkipBackend(backend, req)) {
567 const auto coverage = backend.coverageArea(coverageType);
568 if (coverage.isEmpty()) {
572 if (bothLocationMatch) {
573 if (!coverage.coversLocation(req.
from()) || !coverage.coversLocation(req.
to())) {
577 if (!coverage.coversLocation(req.
from()) && !coverage.coversLocation(req.
to())) {
583 foundNonGlobalCoverage |= !coverage.isGlobal();
585 if (d->queryJourney(BackendPrivate::impl(backend), req, reply)) {
591 for (
const auto &backend: d->m_backends) {
592 checkBackend(backend,
true);
594 if (pendingOps && foundNonGlobalCoverage) {
599 for (
const auto &backend: d->m_backends) {
600 checkBackend(backend,
false);
602 if (pendingOps && foundNonGlobalCoverage) {
609 for (
const auto &context : req.contexts()) {
611 if ((context.type == RequestContext::Next && context.backend->hasCapability(AbstractBackend::CanQueryNextJourney))
612 ||(context.type == RequestContext::Previous && context.backend->hasCapability(AbstractBackend::CanQueryPreviousJourney)))
614 if (d->queryJourney(context.backend, req, reply)) {
624 if (d->queryJourney(context.backend, r, reply)) {
631 if (d->queryJourney(context.backend, r, reply)) {
640 reply->addAttributions(AssetRepository::instance()->attributions());
642 reply->setPendingOps(pendingOps);
654 reply->setPendingOps(pendingOps);
661 if (req.contexts().empty()) {
663 bool foundNonGlobalCoverage =
false;
664 for (
const auto coverageType : { CoverageArea::Realtime, CoverageArea::Regular, CoverageArea::Any }) {
665 for (
const auto &backend: d->m_backends) {
666 if (triedBackends.
contains(backend.identifier()) || d->shouldSkipBackend(backend, req)) {
670 qCDebug(
Log) <<
"Skipping backend due to not supporting arrival queries:" << backend.identifier();
673 const auto coverage = backend.coverageArea(coverageType);
674 if (coverage.isEmpty() || !coverage.coversLocation(req.
stop())) {
677 triedBackends.
insert(backend.identifier());
678 foundNonGlobalCoverage |= !coverage.isGlobal();
680 if (d->queryStopover(BackendPrivate::impl(backend), req, reply)) {
685 if (pendingOps && foundNonGlobalCoverage) {
692 for (
const auto &context : req.contexts()) {
694 if ((context.type == RequestContext::Next && context.backend->hasCapability(AbstractBackend::CanQueryNextDeparture))
695 ||(context.type == RequestContext::Previous && context.backend->hasCapability(AbstractBackend::CanQueryPreviousDeparture)))
697 if (d->queryStopover(context.backend, req, reply)) {
704 if (context.type == RequestContext::Next) {
706 r.setDateTime(context.dateTime);
707 if (d->queryStopover(context.backend, r, reply)) {
716 reply->addAttributions(AssetRepository::instance()->attributions());
718 reply->setPendingOps(pendingOps);
725 switch (cache.type) {
726 case CacheHitType::Negative:
727 qCDebug(
Log) <<
"Negative cache hit for backend" << backend.
identifier();
729 case CacheHitType::Positive:
730 qCDebug(
Log) <<
"Positive cache hit for backend" << backend.
identifier();
731 reply->addAttributions(std::move(cache.attributions));
732 reply->addResult(std::move(cache.data));
734 case CacheHitType::Miss:
735 qCDebug(
Log) <<
"Cache miss for backend" << backend.
identifier();
736 reply->addAttribution(BackendPrivate::impl(backend)->attribution());
737 if (BackendPrivate::impl(backend)->queryLocation(req, reply, nam())) {
754 reply->setPendingOps(pendingOps);
761 bool foundNonGlobalCoverage =
false;
764 for (
const auto coverageType : { CoverageArea::Realtime, CoverageArea::Regular, CoverageArea::Any }) {
766 for (
const auto &backend : d->m_backends) {
767 if (triedBackends.
contains(backend.
identifier()) || d->shouldSkipBackend(backend, req)) {
770 const auto coverage = backend.coverageArea(coverageType);
771 if (coverage.isEmpty() || !coverage.coversLocation(loc)) {
774 if (isCountryOnly && !coverage.hasNationWideCoverage(loc.
country())) {
779 foundNonGlobalCoverage |= !coverage.isGlobal();
780 pendingOps += d->queryLocationOnBackend(req, reply, backend);
782 if (pendingOps && foundNonGlobalCoverage) {
787 for (
const auto &backend : d->m_backends) {
788 if (triedBackends.
contains(backend.
identifier()) || d->shouldSkipBackend(backend, req)) {
791 const auto coverage = backend.coverageArea(coverageType);
792 if (coverage.isEmpty() || !coverage.coversLocation(loc)) {
797 foundNonGlobalCoverage |= !coverage.isGlobal();
798 pendingOps += d->queryLocationOnBackend(req, reply, backend);
800 if (pendingOps && foundNonGlobalCoverage) {
804 reply->setPendingOps(pendingOps);
816 reply->setPendingOps(pendingOps);
822 for (
const auto coverageType : { CoverageArea::Realtime, CoverageArea::Regular }) {
823 for (
const auto &backend : d->m_backends) {
824 if (d->shouldSkipBackend(backend, req)) {
827 const auto coverage = backend.coverageArea(coverageType);
828 if (coverage.isEmpty() || !coverage.coversLocation(req.
stopover().
stopPoint())) {
831 reply->addAttribution(BackendPrivate::impl(backend)->attribution());
834 switch (cache.type) {
835 case CacheHitType::Negative:
836 qCDebug(
Log) <<
"Negative cache hit for backend" << backend.
identifier();
838 case CacheHitType::Positive:
839 qCDebug(
Log) <<
"Positive cache hit for backend" << backend.
identifier();
840 if (cache.data.size() == 1) {
841 reply->addAttributions(std::move(cache.attributions));
842 reply->addResult(cache.data[0]);
846 case CacheHitType::Miss:
847 qCDebug(
Log) <<
"Cache miss for backend" << backend.
identifier();
859 reply->setPendingOps(pendingOps);
865 d->m_backends.clear();
873 d->readCachedAttributions();
874 return d->m_attributions;
877QVariantList Manager::attributionsVariant()
const
880 d->readCachedAttributions();
882 l.
reserve(d->m_attributions.size());
883 std::transform(d->m_attributions.begin(), d->m_attributions.end(), std::back_inserter(l), [](
const auto &attr) { return QVariant::fromValue(attr); });
890 return d->m_backends;
895 if (std::binary_search(d->m_disabledBackends.cbegin(), d->m_disabledBackends.cend(), backendId)) {
898 if (std::binary_search(d->m_enabledBackends.cbegin(), d->m_enabledBackends.cend(), backendId)) {
902 return d->m_backendsEnabledByDefault;
907 const auto it = std::lower_bound(l.
begin(), l.
end(), value);
908 if (it == l.
end() || (*it) != value) {
915 const auto it = std::lower_bound(l.
begin(), l.
end(), value);
916 if (it != l.
end() && (*it) == value) {
924 sortedInsert(d->m_enabledBackends, backendId);
925 sortedRemove(d->m_disabledBackends, backendId);
927 sortedRemove(d->m_enabledBackends, backendId);
928 sortedInsert(d->m_disabledBackends, backendId);
930 Q_EMIT configurationChanged();
935 return d->m_enabledBackends;
941 for (
const auto &backendId : backendIds) {
948 return d->m_disabledBackends;
954 for (
const auto &backendId : backendIds) {
961 return d->m_backendsEnabledByDefault;
966 d->m_backendsEnabledByDefault = byDefault;
968 Q_EMIT configurationChanged();
971QVariantList Manager::backendsVariant()
const
975 l.
reserve(d->m_backends.size());
976 std::transform(d->m_backends.begin(), d->m_backends.end(), std::back_inserter(l), [](
const auto &b) { return QVariant::fromValue(b); });
static Attribution fromJson(const QJsonObject &obj)
Deserialize an Attribution object from JSON.
Information about a backend service queried for location/departure/journey data.
bool isSecure
Supports secrure network access.
QString identifier
Internal identifier of this backend.
Describes a journey search.
KPublicTransport::Location to
The journey destination.
void setArrivalTime(const QDateTime &dt)
Sets the desired arrival time.
void setDepartureTime(const QDateTime &dt)
Set the desired departure time.
bool downloadAssets
Download graphic assets such as line logos for the data requested here.
@ Departure
dateTime() represents the desired departure time.
bool isValid() const
Returns true if this is a valid request, that is, it has enough parameters set to perform a query.
QString cacheKey() const
Unique string representation used for caching results.
KPublicTransport::Location from
The starting point of the journey search.
KPublicTransport::JourneySection::Modes modes
Modes of transportation that should be considered for this query.
DateTimeMode dateTimeMode
Controls whether to search for journeys starting or ending at the given time.
@ RentedVehicle
free floating or dock-based rental bike service, electric scooters, car sharing services,...
Describes a location search.
bool isValid() const
Returns true if this is a valid request, that is it has enough parameters set to perform a query.
QString cacheKey() const
Unique string representation used for caching results.
KPublicTransport::Location location
Location object containing the search parameters.
QString region
Region (as in ISO 3166-2) of the location, if known.
@ RentedVehicleStation
a pick-up/drop-off point for dock-based rental bike/scooter systems
@ Place
a location that isn't of any specific type
@ Stop
a public transport stop (train station, bus stop, etc)
static Location merge(const Location &lhs, const Location &rhs)
Merge two departure instances.
QString country
Country of the location as ISO 3166-1 alpha 2 code, if known.
LocationReply * queryLocation(const LocationRequest &req) const
Query location information based on coordinates or (parts of) the name.
void setBackendsEnabledByDefault(bool byDefault)
Set wheter backends are enabled by default.
void setEnabledBackends(const QStringList &backendIds)
Sets the explicitly enabled backends.
bool backendsEnabledByDefault
void setBackendEnabled(const QString &backendId, bool enabled)
Sets whether the backend with the given identifier should be used.
void reload()
Reload backend configuration.
QStringList disabledBackends
Q_INVOKABLE bool isBackendEnabled(const QString &backendId) const
Returns whether the use of the backend with a given identifier is enabled.
void setDisabledBackends(const QStringList &backendIds)
Sets the explicitly disabled backends.
VehicleLayoutReply * queryVehicleLayout(const VehicleLayoutRequest &req) const
Query vehicle and platform layout information.
QVariantList backends
QML-compatible access to backends().
QStringList enabledBackends
QVariantList attributions
QML-compatible access to attributions().
void finished()
Emitted whenever the corresponding search has been completed.
const std::vector< Attribution > & attributions() const
Returns the attributions for the provided data.
@ InvalidRequest
Incomplete or otherwise invalid request.
@ NotFoundError
The requested journey/departure/place could not be found.
Departure or arrival query reply.
Describes an arrival or departure search.
@ QueryArrival
Search for arrivals.
bool downloadAssets
Enable downloading of graphic assets such as line logos for the data requested here.
bool isValid() const
Returns true if this is a valid request, ie.
QString cacheKey() const
Unique string representation used for caching results.
KPublicTransport::Location stop
The location at which to search for departures/arrivals.
Mode mode
Controls whether to search for arrivals or departures.
KPublicTransport::Location stopPoint
The stop point of this departure.
Reply to a vehicle layout query.
Describes a query for vehicle layout information.
QString cacheKey() const
Unique string representation used for caching results.
bool isValid() const
Returns true if this is a valid request, that is it has enough parameters set to perform a query.
KPublicTransport::Stopover stopover
The stopover vehicle and platform layout information are requested for.
void error(QWidget *parent, const QString &text, const QString &title, const KGuiItem &buttonOk, Options options=Notify)
Query operations and data types for accessing realtime public transport information from online servi...
QCoreApplication * instance()
QJsonDocument fromJson(const QByteArray &json, QJsonParseError *error)
QJsonValue value(QLatin1StringView key) const const
QJsonArray toArray() const const
QJsonObject toObject() const const
QString toString() const const
iterator erase(const_iterator begin, const_iterator end)
iterator insert(const_iterator before, parameter_type value)
void push_back(parameter_type value)
void reserve(qsizetype size)
void enableStrictTransportSecurityStore(bool enabled, const QString &storeDir)
void setRedirectPolicy(QNetworkRequest::RedirectPolicy policy)
void setStrictTransportSecurityEnabled(bool enabled)
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
virtual bool event(QEvent *e)
virtual bool eventFilter(QObject *watched, QEvent *event)
void installEventFilter(QObject *filterObj)
bool contains(const QSet< T > &other) const const
iterator insert(const T &value)
QStringList standardLocations(StandardLocation type)
QString writableLocation(StandardLocation type)
bool isEmpty() const const