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
qgeoroutereply.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 QGEOROUTEREPLY_H
6#define QGEOROUTEREPLY_H
7
8#include <QtLocation/QGeoRoute>
9
10#include <QtCore/QList>
11#include <QtCore/QObject>
12
13QT_BEGIN_NAMESPACE
14
15class QGeoRouteRequest;
17
18class Q_LOCATION_EXPORT QGeoRouteReply : public QObject
19{
20 Q_OBJECT
21public:
22 enum Error {
23 NoError,
24 EngineNotSetError,
25 CommunicationError,
26 ParseError,
27 UnsupportedOptionError,
28 UnknownError
29 };
30 Q_ENUM(Error)
31
32 explicit QGeoRouteReply(Error error, const QString &errorString, QObject *parent = nullptr);
33 virtual ~QGeoRouteReply();
34
35 bool isFinished() const;
36 Error error() const;
37 QString errorString() const;
38
39 QGeoRouteRequest request() const;
40 QList<QGeoRoute> routes() const;
41
42 virtual void abort();
43
44Q_SIGNALS:
45 void finished();
46 void aborted();
47 void errorOccurred(QGeoRouteReply::Error error, const QString &errorString = QString());
48
49protected:
50 explicit QGeoRouteReply(const QGeoRouteRequest &request, QObject *parent = nullptr);
51
52 void setError(Error error, const QString &errorString);
53 void setFinished(bool finished);
54
55 void setRoutes(const QList<QGeoRoute> &routes);
56 void addRoutes(const QList<QGeoRoute> &routes);
57
58private:
59 QGeoRouteReplyPrivate *d_ptr;
60 Q_DISABLE_COPY(QGeoRouteReply)
61};
62
63QT_END_NAMESPACE
64
65#endif
\inmodule QtLocation
\inmodule QtLocation
Combined button and popup list for selecting options.