Kgapi
9#include "staticmaptilefetchjob.h"
11#include "staticmapurl.h"
13#include <QNetworkAccessManager>
14#include <QNetworkReply>
15#include <QNetworkRequest>
19class Q_DECL_HIDDEN StaticMapTileFetchJob::Private
33StaticMapTileFetchJob::StaticMapTileFetchJob(
const QUrl &url,
QObject *parent)
40StaticMapTileFetchJob::~StaticMapTileFetchJob()
45QPixmap StaticMapTileFetchJob::tilePixmap()
const
48 qCWarning(KGAPIDebug) <<
"Called tilePixmap on a running job!";
55void StaticMapTileFetchJob::start()
60void StaticMapTileFetchJob::dispatchRequest(QNetworkAccessManager *accessManager,
61 const QNetworkRequest &request,
62 const QByteArray &data,
63 const QString &contentType)
68 accessManager->
get(request);
71void StaticMapTileFetchJob::handleReply(
const QNetworkReply *reply,
const QByteArray &rawData)
75 d->tilePixmap.loadFromData(rawData);
79#include "moc_staticmaptilefetchjob.cpp"
Abstract base class for all jobs in LibKGAPI.
virtual void emitFinished()
Emits Job::finished() signal.
virtual void enqueueRequest(const QNetworkRequest &request, const QByteArray &data=QByteArray(), const QString &contentType=QString())
Enqueues request in dispatcher queue.
bool isRunning
Whether the job is running.
A class to build a URL from StaticMapMarkers and StaticMapPaths to fetch a map tile.
QUrl url() const
Returns constructed url from all defined parameters.
A job to fetch a single map tile described by a StaticMapUrl.
QNetworkReply * get(const QNetworkRequest &request)
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:57:31 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.