Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qgeocodejsonparser.h
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
4#ifndef QGEOCODEJSONPARSER_H
5#define QGEOCODEJSONPARSER_H
6
7#include <QtPositioning/QGeoShape>
8#include <QtPositioning/QGeoLocation>
9
10#include <QtCore/QObject>
11#include <QtCore/QRunnable>
12#include <QtCore/QJsonDocument>
13#include <QtCore/QByteArray>
14#include <QtCore/QString>
15#include <QtCore/QList>
16
18
19class QGeoCodeJsonParser : public QObject, public QRunnable
20{
22
23public:
24 void setBounds(const QGeoShape &bounds);
25 void parse(const QByteArray &data);
26 void run() override;
27
30 void errorOccurred(const QString &errorString);
31
32private:
33 QJsonDocument m_document;
34 QByteArray m_data;
35 QGeoShape m_bounds;
36 QList<QGeoLocation> m_results;
37 QString m_errorString;
38};
39
41
42#endif
\inmodule QtCore
Definition qbytearray.h:57
void setBounds(const QGeoShape &bounds)
void run() override
Implement this pure virtual function in your subclass.
void errorOccurred(const QString &errorString)
void parse(const QByteArray &data)
void results(const QList< QGeoLocation > &locations)
\inmodule QtPositioning
Definition qgeoshape.h:17
\inmodule QtCore\reentrant
Definition qlist.h:74
\inmodule QtCore
Definition qobject.h:90
\inmodule QtCore
Definition qrunnable.h:18
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
Combined button and popup list for selecting options.
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLuint const GLint * locations
#define Q_OBJECT
#define signals