Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qgeotiledmapreply.cpp
Go to the documentation of this file.
1// Copyright (C) 2015 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
6
7#include <qdebug.h>
8
60 : QObject(parent),
61 d_ptr(new QGeoTiledMapReplyPrivate(spec))
62{
63}
64
69 : QObject(parent),
70 d_ptr(new QGeoTiledMapReplyPrivate(error, errorString)) {}
71
76{
77 delete d_ptr;
78}
79
92{
93 d_ptr->isFinished = finished;
94 if (d_ptr->isFinished)
95 emit this->finished();
96}
97
103{
104 return d_ptr->isFinished;
105}
106
121
128{
129 return d_ptr->error;
130}
131
143{
144 return d_ptr->errorString;
145}
146
151{
152 return d_ptr->isCached;
153}
154
159{
160 d_ptr->isCached = cached;
161}
162
167{
168 return d_ptr->spec;
169}
170
175{
176 return d_ptr->mapImageData;
177}
178
186
191{
192 return d_ptr->mapImageFormat;
193}
194
202
209{
210 if (!isFinished())
211 setFinished(true);
212 emit aborted();
213}
214
245/*******************************************************************************
246*******************************************************************************/
247
251
253 : error(error),
254 errorString(errorString),
255 isFinished(true)
256{}
257
\inmodule QtCore
Definition qbytearray.h:57
QGeoTiledMapReplyPrivate(const QGeoTileSpec &spec)
QGeoTiledMapReply::Error error
void setMapImageFormat(const QString &format)
Sets the format of the tile image to format.
Error error() const
Returns the error state of this reply.
bool isFinished() const
Return true if the operation completed successfully or encountered an error which cause the operation...
void finished()
This signal is emitted when this reply has finished processing.
void errorOccurred(QGeoTiledMapReply::Error error, const QString &errorString=QString())
This signal is emitted when an error has been detected in the processing of this reply.
Error
Describes an error which prevented the completion of the operation.
QByteArray mapImageData() const
Returns the tile image data.
QGeoTiledMapReply(const QGeoTileSpec &spec, QObject *parent=nullptr)
Constructs a tiled map reply object based on request, with parent parent.
QGeoTileSpec tileSpec() const
Returns the request which corresponds to this reply.
virtual void abort()
Cancels the operation immediately.
virtual ~QGeoTiledMapReply()
Destroys this tiled map reply object.
void setCached(bool cached)
Sets whether the reply is coming from a cache to cached.
QString mapImageFormat() const
Returns the format of the tile image.
void setFinished(bool finished)
Sets whether or not this reply has finished to finished.
bool isCached() const
Returns whether the reply is coming from a cache.
QString errorString() const
Returns the textual representation of the error state of this reply.
void setError(Error error, const QString &errorString)
Sets the error state of this reply to error and the textual representation of the error to errorStrin...
void setMapImageData(const QByteArray &data)
Sets the tile image data to data.
\inmodule QtCore
Definition qobject.h:103
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
DBusConnection const char DBusError * error
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLint GLsizei GLsizei GLenum format
#define emit