1 /****************************************************************************
2 **
3 **Copyright(C)2015TheQtCompanyLtd.
4 **Contact: http://www.qt.io/licensing/
5 **
6 **This file is part of the QtPositioning module of the QtToolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL21$
9 **CommercialLicenseUsage
10 **Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 **Softwareor, alternatively,in accordance with the terms contained in
13 ** a written agreement between you andTheQtCompany.For licensing terms
14 **and conditions see http://www.qt.io/terms-conditions.For further
15 ** information use the contact form at http://www.qt.io/contact-us.
16 **
17 ** GNU LesserGeneralPublicLicenseUsage
18 **Alternatively, this file may be used under the terms of the GNU Lesser
19 **GeneralPublicLicense version 2.1or version 3as published by the Free
20 **SoftwareFoundationand appearing in the file LICENSE.LGPLv21and
21 ** LICENSE.LGPLv3 included in the packaging of this file.Please review the
22 ** following information to ensure the GNU LesserGeneralPublicLicense
23 ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
24 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
25 **
26 **As a special exception,TheQtCompany gives you certain additional
27 ** rights.These rights are described inTheQtCompany LGPL Exception
28 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
29 **
30 ** $QT_END_LICENSE$
31 **
32 ****************************************************************************/
33 #ifndef QGEOLOCATION_H
34 #define QGEOLOCATION_H
35 #include <QtCore/QSharedDataPointer>
36 #include <QtCore/QMetaType>
37 #include <QtPositioning/qpositioningglobal.h>
38 QT_BEGIN_NAMESPACE
39 classQGeoAddress;
40 classQGeoCoordinate;
41 classQGeoRectangle;
42 classQGeoLocationPrivate;
43 class Q_POSITIONING_EXPORT QGeoLocation
44 {
45 public:
46 QGeoLocation();
47 QGeoLocation(const QGeoLocation&other);
48 ~QGeoLocation();
49 QGeoLocation&operator=(const QGeoLocation&other);
50 bool operator==(const QGeoLocation&other) const;
51 bool operator!=(const QGeoLocation&other) const {
52 return!(other ==*this);
53 }
54 QGeoAddress address() const;
55 void setAddress(const QGeoAddress&address);
56 QGeoCoordinate coordinate() const;
57 void setCoordinate(const QGeoCoordinate&position);
58 QGeoRectangle boundingBox() const;
59 void setBoundingBox(const QGeoRectangle&box);
60 bool isEmpty() const;
61 private:
62 QSharedDataPointer<QGeoLocationPrivate> d;
63 };
64 Q_DECLARE_TYPEINFO(QGeoLocation, Q_MOVABLE_TYPE);
65 QT_END_NAMESPACE
66 Q_DECLARE_METATYPE(QGeoLocation)
67 #endif
1 make && date
2 sudo make install && date