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