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
4#ifndef QDECLARATIVEGEOLOCATION_P_H
5#define QDECLARATIVEGEOLOCATION_P_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 <QtCore/QObject>
19#include <QtCore/QVariantMap>
20#include <QtCore/private/qproperty_p.h>
21#include <QtPositioning/QGeoLocation>
22#include <QtPositioning/QGeoShape>
23#include <QtPositioningQuick/private/qdeclarativegeoaddress_p.h>
24#include <QtPositioningQuick/private/qpositioningquickglobal_p.h>
25
27
29{
30 Q_OBJECT
31 QML_NAMED_ELEMENT(Location)
32 QML_ADDED_IN_VERSION(5, 0)
33
34 Q_PROPERTY(QGeoLocation location READ location WRITE setLocation)
35 Q_PROPERTY(QDeclarativeGeoAddress *address READ address WRITE setAddress BINDABLE
36 bindableAddress)
37 Q_PROPERTY(QGeoCoordinate coordinate READ coordinate WRITE setCoordinate BINDABLE
38 bindableCoordinate)
39 Q_PROPERTY(QGeoShape boundingShape READ boundingShape WRITE setBoundingShape BINDABLE
40 bindableBoundingShape REVISION(6, 2))
41 Q_PROPERTY(QVariantMap extendedAttributes READ extendedAttributes WRITE setExtendedAttributes
42 BINDABLE bindableExtendedAttributes REVISION(5, 13))
43
44public:
45 explicit QDeclarativeGeoLocation(QObject *parent = 0);
46 explicit QDeclarativeGeoLocation(const QGeoLocation &src, QObject *parent = 0);
47 ~QDeclarativeGeoLocation();
48
49 QGeoLocation location() const;
50 void setLocation(const QGeoLocation &src);
51
52 QDeclarativeGeoAddress *address() const;
53 void setAddress(QDeclarativeGeoAddress *address);
54 QBindable<QDeclarativeGeoAddress *> bindableAddress();
55
56 QGeoCoordinate coordinate() const;
57 void setCoordinate(const QGeoCoordinate coordinate);
58 QBindable<QGeoCoordinate> bindableCoordinate();
59
60 QGeoShape boundingShape() const;
61 void setBoundingShape(const QGeoShape &boundingShape);
62 QBindable<QGeoShape> bindableBoundingShape();
63
64 QVariantMap extendedAttributes() const;
65 void setExtendedAttributes(const QVariantMap &attributes);
66 QBindable<QVariantMap> bindableExtendedAttributes();
67
68private:
69 void setLocationInternal(const QGeoLocation &src);
70
71 Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS(QDeclarativeGeoLocation, QDeclarativeGeoAddress *, m_address,
72 &QDeclarativeGeoLocation::setAddress, nullptr)
73 Q_OBJECT_BINDABLE_PROPERTY(QDeclarativeGeoLocation, QGeoShape, m_boundingShape)
74 Q_OBJECT_BINDABLE_PROPERTY(QDeclarativeGeoLocation, QGeoCoordinate, m_coordinate)
75 Q_OBJECT_BINDABLE_PROPERTY(QDeclarativeGeoLocation, QVariantMap, m_extendedAttributes)
76};
77
78QT_END_NAMESPACE
79
80#endif // QDECLARATIVELOCATION_P_H
Combined button and popup list for selecting options.