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