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
qgeocoordinateobject_p.h
Go to the documentation of this file.
1// Copyright (C) 2017 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 QGEOCOORDINATEOBJECT_P_H
6#define QGEOCOORDINATEOBJECT_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 <QtPositioning/private/qpositioningglobal_p.h>
20#include <QObject>
21#include <QProperty>
22#include <QGeoCoordinate>
23#include <QVariantMap>
24
26
28{
29 Q_OBJECT
30 Q_PROPERTY(QGeoCoordinate coordinate READ coordinate WRITE setCoordinate NOTIFY
31 coordinateChanged BINDABLE bindableCoordinate)
32
33public:
34 QGeoCoordinateObject(QObject *parent = 0);
35 QGeoCoordinateObject(const QGeoCoordinate &c, QObject *parent = 0);
36 virtual ~QGeoCoordinateObject();
37
38 bool operator==(const QGeoCoordinate &other) const;
39 bool operator==(const QGeoCoordinateObject &other) const;
40 inline bool operator!=(const QGeoCoordinate &other) const {
41 return !operator==(other);
42 }
43 inline bool operator!=(const QGeoCoordinateObject &other) const {
44 return !operator==(other);
45 }
46
47 QGeoCoordinate coordinate() const;
48 void setCoordinate(const QGeoCoordinate &c);
49 QBindable<QGeoCoordinate> bindableCoordinate();
50
51Q_SIGNALS:
52 void coordinateChanged();
53
54protected:
55 Q_OBJECT_BINDABLE_PROPERTY(QGeoCoordinateObject, QGeoCoordinate, m_coordinate,
56 &QGeoCoordinateObject::coordinateChanged)
57};
58
59QT_END_NAMESPACE
60
61QT_DECL_METATYPE_EXTERN_TAGGED(QGeoCoordinateObject*, QGeoCoordinateObject_ptr,
62 Q_POSITIONING_EXPORT)
63
64#endif // QGEOCOORDINATEOBJECT_P_H