6#include <QtCore/QJsonDocument>
7#include <QtCore/QJsonObject>
18 metadata[
"isHTTPS"] = isHTTPS;
32 m_cameraCapabilities(cameraCapabilities)
34 for (
int i = 0;
i < providers.
size(); ++
i) {
157 if (
p->isValid() && !found) {
190 if (!
p->isInvalid()) {
196 p->resolveProvider();
234 std::unique_ptr<TileProvider>
p(provider);
238 provider =
p.release();
266: m_status(Idle), m_urlRedirector(urlRedirector), m_nm(
nullptr), m_timestamp(
defaultTs), m_highDpi(highDpi)
277 int minimumZoomLevel,
278 int maximumZoomLevel)
280 m_format(
format), m_copyRightMap(copyRightMap), m_copyRightData(copyRightData),
281 m_minimumZoomLevel(minimumZoomLevel), m_maximumZoomLevel(maximumZoomLevel), m_timestamp(
defaultTs), m_highDpi(highDpi)
494 if (m_minimumZoomLevel < 0 || m_minimumZoomLevel > 30)
514 int sortedOffsets[3];
516 sort2(sortedOffsets[0] ,sortedOffsets[1]);
517 sort2(sortedOffsets[1] ,sortedOffsets[2]);
518 sort2(sortedOffsets[0] ,sortedOffsets[1]);
520 int min = sortedOffsets[0];
521 int max = sortedOffsets[2];
522 int mid = sortedOffsets[1];
525 for (
int i=0;
i<3;
i++) {
526 if (
offset[0] == sortedOffsets[
i])
528 else if (
offset[1] == sortedOffsets[
i])
\inmodule QtCore\reentrant
void setMaximumZoomLevel(double maximumZoomLevel)
void setMinimumZoomLevel(double minimumZoomLevel)
QML_STRUCTURED_VALUEMapStyle style
QByteArray pluginName() const
QGeoCameraCapabilities cameraCapabilities
QGeoTileProviderOsm(QNetworkAccessManager *nm, const QGeoMapType &mapType, const QList< TileProvider * > &providers, const QGeoCameraCapabilities &cameraCapabilities)
QNetworkAccessManager * m_nm
void disableRedirection()
void resolutionRequired()
void onResolutionFinished(TileProvider *provider)
QString dataCopyRight() const
const QGeoMapType & mapType() const
QString mapCopyRight() const
QGeoCameraCapabilities m_cameraCapabilities
QGeoCameraCapabilities cameraCapabilities() const
QDateTime timestamp() const
void onResolutionError(TileProvider *provider)
void updateCameraCapabilities()
int maximumZoomLevel() const
QList< TileProvider * > m_providerList
void addProvider(TileProvider *provider)
void resolutionFinished(const QGeoTileProviderOsm *provider)
QString styleCopyRight() const
void resolutionError(const QGeoTileProviderOsm *provider)
TileProvider * m_provider
int minimumZoomLevel() const
QUrl tileAddress(int x, int y, int z) const
QByteArray readAll()
Reads all remaining data from the device, and returns it as a byte array.
\inmodule QtCore\reentrant
static QJsonDocument fromJson(const QByteArray &json, QJsonParseError *error=nullptr)
Parses json as a UTF-8 encoded JSON document, and creates a QJsonDocument from it.
\inmodule QtCore\reentrant
QJsonValue value(const QString &key) const
Returns a QJsonValue representing the value for the key key.
\inmodule QtCore\reentrant
bool isString() const
Returns true if the value contains a string.
bool isDouble() const
Returns true if the value contains a double.
double toDouble(double defaultValue=0) const
Converts the value to a double and returns it.
QString toString() const
Converts the value to a QString and returns it.
qsizetype size() const noexcept
void append(parameter_type t)
The QNetworkAccessManager class allows the application to send network requests and receive replies.
QNetworkReply * get(const QNetworkRequest &request)
Posts a request to obtain the contents of the target request and returns a new QNetworkReply object o...
The QNetworkReply class contains the data and headers for a request sent with QNetworkAccessManager.
void errorOccurred(QNetworkReply::NetworkError)
NetworkError error() const
Returns the error that was found during the processing of this request.
NetworkError
Indicates all possible error conditions found during the processing of the request.
@ ContentOperationNotPermittedError
@ OperationNotImplementedError
@ ServiceUnavailableError
@ AuthenticationRequiredError
void finished()
This signal is emitted when the reply has finished processing.
The QNetworkRequest class holds a request to be sent with QNetworkAccessManager.
@ CacheLoadControlAttribute
@ BackgroundRequestAttribute
void setHeader(KnownHeaders header, const QVariant &value)
Sets the value of the known header header to be value, overriding any previously set headers.
void setAttribute(Attribute code, const QVariant &value)
Sets the attribute associated with code code to be value value.
void setUrl(const QUrl &url)
Sets the URL this network request is referring to be url.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
QObject * sender() const
Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; othe...
void setParent(QObject *parent)
Makes the object a child of parent.
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
\threadsafe
void destroyed(QObject *=nullptr)
This signal is emitted immediately before the object obj is destroyed, after any instances of QPointe...
void deleteLater()
\threadsafe
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool startsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string starts with s; otherwise returns false.
qsizetype size() const
Returns the number of characters in this string.
QString mid(qsizetype position, qsizetype n=-1) const
Returns a string that contains n characters of this string, starting at the specified position index.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
static QString static QString qsizetype indexOf(QChar c, qsizetype from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
bool isValid() const
Returns true if the URL is non-empty and valid; otherwise returns false.
int minimumZoomLevel() const
void handleError(QNetworkReply::NetworkError error)
void onNetworkReplyFinished()
void onNetworkReplyError(QNetworkReply::NetworkError error)
int maximumZoomLevel() const
QString styleCopyRight() const
QString dataCopyRight() const
void resolutionFinished(TileProvider *provider)
void setStyleCopyRight(const QString ©right)
void setNetworkManager(QNetworkAccessManager *nm)
QString mapCopyRight() const
QUrl tileAddress(int x, int y, int z) const
QNetworkAccessManager * m_nm
const QDateTime & timestamp() const
void resolutionError(TileProvider *provider)
void setTimestamp(const QDateTime ×tamp)
Combined button and popup list for selecting options.
#define QByteArrayLiteral(str)
DBusConnection const char DBusError * error
static void sort2(int &a, int &b)
static const QDateTime defaultTs
static void setSSL(QGeoMapType &mapType, bool isHTTPS)
static QT_BEGIN_NAMESPACE const int maxValidZoom
constexpr const T & qBound(const T &min, const T &val, const T &max)
GLboolean GLboolean GLboolean b
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat z
GLint GLint GLint GLint GLint x
[0]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLenum GLuint GLintptr offset
GLint GLsizei GLsizei GLenum format
QLatin1StringView QLatin1String
#define QStringLiteral(str)
QUrl url("example.com")
[constructor-url-reference]
QNetworkRequest request(url)
\inmodule QtCore\reentrant
qsizetype indexOf(const AT &t, qsizetype from=0) const noexcept