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
qdeclarativegeolocation_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 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 QDECLARATIVEGEOLOCATION_P_H
6#define QDECLARATIVEGEOLOCATION_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtCore/QObject>
20#include <QtCore/QVariantMap>
21#include <QtCore/private/qproperty_p.h>
22#include <QtPositioning/QGeoLocation>
23#include <QtPositioning/QGeoShape>
24#include <QtPositioningQuick/private/qdeclarativegeoaddress_p.h>
25#include <QtPositioningQuick/private/qpositioningquickglobal_p.h>
26
28
30{
31 Q_OBJECT
32 QML_NAMED_ELEMENT(Location)
33 QML_ADDED_IN_VERSION(5, 0)
34
35 Q_PROPERTY(QGeoLocation location READ location WRITE setLocation)
36 Q_PROPERTY(QDeclarativeGeoAddress *address READ address WRITE setAddress BINDABLE
37 bindableAddress)
38 Q_PROPERTY(QGeoCoordinate coordinate READ coordinate WRITE setCoordinate BINDABLE
39 bindableCoordinate)
40 Q_PROPERTY(QGeoShape boundingShape READ boundingShape WRITE setBoundingShape BINDABLE
41 bindableBoundingShape REVISION(6, 2))
42 Q_PROPERTY(QVariantMap extendedAttributes READ extendedAttributes WRITE setExtendedAttributes
43 BINDABLE bindableExtendedAttributes REVISION(5, 13))
44
45public:
46 explicit QDeclarativeGeoLocation(QObject *parent = 0);
47 explicit QDeclarativeGeoLocation(const QGeoLocation &src, QObject *parent = 0);
48 ~QDeclarativeGeoLocation();
49
50 QGeoLocation location() const;
51 void setLocation(const QGeoLocation &src);
52
53 QDeclarativeGeoAddress *address() const;
54 void setAddress(QDeclarativeGeoAddress *address);
55 QBindable<QDeclarativeGeoAddress *> bindableAddress();
56
57 QGeoCoordinate coordinate() const;
58 void setCoordinate(const QGeoCoordinate coordinate);
59 QBindable<QGeoCoordinate> bindableCoordinate();
60
61 QGeoShape boundingShape() const;
62 void setBoundingShape(const QGeoShape &boundingShape);
63 QBindable<QGeoShape> bindableBoundingShape();
64
65 QVariantMap extendedAttributes() const;
66 void setExtendedAttributes(const QVariantMap &attributes);
67 QBindable<QVariantMap> bindableExtendedAttributes();
68
69private:
70 void setLocationInternal(const QGeoLocation &src);
71
72 Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS(QDeclarativeGeoLocation, QDeclarativeGeoAddress *, m_address,
73 &QDeclarativeGeoLocation::setAddress, nullptr)
74 Q_OBJECT_BINDABLE_PROPERTY(QDeclarativeGeoLocation, QGeoShape, m_boundingShape)
75 Q_OBJECT_BINDABLE_PROPERTY(QDeclarativeGeoLocation, QGeoCoordinate, m_coordinate)
76 Q_OBJECT_BINDABLE_PROPERTY(QDeclarativeGeoLocation, QVariantMap, m_extendedAttributes)
77};
78
79QT_END_NAMESPACE
80
81#endif // QDECLARATIVELOCATION_P_H
Combined button and popup list for selecting options.