Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qdeclarativeroutemapitem.cpp
Go to the documentation of this file.
1// Copyright (C) 2022 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
7
8#include <QtQml/QQmlInfo>
9#include <QtGui/QPainter>
10
12
61
65
73{
74 return route_;
75}
76
78{
79 if (route_ == route)
80 return;
81
82 route_ = route;
83
84 setPathFromGeoList(route_.path());
85
86 emit routeChanged(route_);
87}
88
89void QDeclarativeRouteMapItem::updateRoutePath()
90{
91 setPathFromGeoList(route_.path());
92}
93
99void QDeclarativeRouteMapItem::setPath(const QList<QGeoCoordinate> &value)
100{
102 qWarning() << "Can not set the path on QDeclarativeRouteMapItem."
103 << "Please use the route property instead.";
104}
105
void setPathFromGeoList(const QList< QGeoCoordinate > &path)
void setPath(const QList< QGeoCoordinate > &value) override
void setRoute(const QGeoRoute &route)
void routeChanged(const QGeoRoute &route)
QDeclarativeRouteMapItem(QQuickItem *parent=nullptr)
\qmltype MapRoute \instantiates QDeclarativeRouteMapItem \inqmlmodule QtLocation
\inmodule QtLocation
Definition qgeoroute.h:24
QList< QGeoCoordinate > path
\qmlproperty list<coordinate> QtLocation::route::path
Definition qgeoroute.h:33
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
void setFlag(Flag flag, bool enabled=true)
Enables the specified flag for this item if enabled is true; if enabled is false, the flag is disable...
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
#define qWarning
Definition qlogging.h:166
#define emit
#define Q_UNUSED(x)