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
qdeclarativeroutemapitem_p.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 QDECLARATIVEROUTEMAPITEM_H_
5#define QDECLARATIVEROUTEMAPITEM_H_
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtLocation/private/qlocationglobal_p.h>
19#include <QtLocation/private/qdeclarativegeomapitembase_p.h>
20#include <QtLocation/private/qdeclarativegeomap_p.h>
21#include <QtLocation/private/qdeclarativepolylinemapitem_p.h>
22#include <QtLocation/QGeoRoute>
23#include <QPen>
24#include <QBrush>
25
27
28class Q_LOCATION_EXPORT QDeclarativeRouteMapItem : public QDeclarativePolylineMapItem
29{
30 Q_OBJECT
31 QML_NAMED_ELEMENT(MapRoute)
32 QML_ADDED_IN_VERSION(5, 0)
33
34 Q_PROPERTY(QGeoRoute route READ route WRITE setRoute NOTIFY routeChanged)
35
36public:
37 explicit QDeclarativeRouteMapItem(QQuickItem *parent = nullptr);
38 ~QDeclarativeRouteMapItem();
39
40 QGeoRoute route() const;
41 void setRoute(const QGeoRoute &route);
42
43Q_SIGNALS:
44 void routeChanged(const QGeoRoute &route);
45
46private slots:
47 void updateRoutePath();
48
49protected:
50 void setPath(const QList<QGeoCoordinate> &value) override;
51
52private:
53 QGeoRoute route_;
54};
55
56QT_END_NAMESPACE
57
58QML_DECLARE_TYPE(QDeclarativeRouteMapItem)
59
60#endif /* QDECLARATIVEROUTEMAPITEM_H_ */