Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qgeocodereply.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// Qt-Security score:significant reason:default
4
5#ifndef QGEOCODEREPLY_H
6#define QGEOCODEREPLY_H
7
8#include <QtLocation/qlocationglobal.h>
9#include <QtPositioning/QGeoShape>
10#include <QtCore/QObject>
11#include <QtCore/QList>
12
13QT_BEGIN_NAMESPACE
14
15class QGeoLocation;
16class QGeoCodeReplyPrivate;
17
18class Q_LOCATION_EXPORT QGeoCodeReply : public QObject
19{
20 Q_OBJECT
21
22public:
23 enum Error {
24 NoError,
25 EngineNotSetError,
26 CommunicationError,
27 ParseError,
28 UnsupportedOptionError,
29 CombinationError,
30 UnknownError
31 };
32
33 explicit QGeoCodeReply(Error error, const QString &errorString, QObject *parent = nullptr);
34 virtual ~QGeoCodeReply();
35
36 bool isFinished() const;
37 Error error() const;
38 QString errorString() const;
39
40 QGeoShape viewport() const;
41 QList<QGeoLocation> locations() const;
42
43 qsizetype limit() const;
44 qsizetype offset() const;
45
46 virtual void abort();
47
48Q_SIGNALS:
49 void finished();
50 void aborted();
51 void errorOccurred(QGeoCodeReply::Error error, const QString &errorString = QString());
52
53protected:
54 explicit QGeoCodeReply(QObject *parent = nullptr);
55
56 void setError(Error error, const QString &errorString);
57 void setFinished(bool finished);
58
59 void setViewport(const QGeoShape &viewport);
60 void addLocation(const QGeoLocation &location);
61 void setLocations(const QList<QGeoLocation> &locations);
62
63 void setLimit(qsizetype limit);
64 void setOffset(qsizetype offset);
65
66private:
67 QGeoCodeReplyPrivate *d_ptr;
68 Q_DISABLE_COPY(QGeoCodeReply)
69 friend class QGeoCodeReplyPrivate;
70};
71
72QT_END_NAMESPACE
73
74#endif
\inmodule QtLocation
Combined button and popup list for selecting options.