diff options
-rw-r--r-- | src/imports/location/location.cpp | 4 | ||||
-rw-r--r-- | src/imports/location/location.pro | 1 | ||||
-rw-r--r-- | src/imports/location/qdeclarativegeoboundingarea_p.h | 64 | ||||
-rw-r--r-- | src/imports/location/qdeclarativegeoboundingbox.cpp | 4 | ||||
-rw-r--r-- | src/imports/location/qdeclarativegeoboundingbox_p.h | 3 | ||||
-rw-r--r-- | src/imports/location/qdeclarativegeoboundingcircle.cpp | 4 | ||||
-rw-r--r-- | src/imports/location/qdeclarativegeoboundingcircle_p.h | 3 |
7 files changed, 76 insertions, 7 deletions
diff --git a/src/imports/location/location.cpp b/src/imports/location/location.cpp index 48b36b5e..1830234d 100644 --- a/src/imports/location/location.cpp +++ b/src/imports/location/location.cpp @@ -47,6 +47,7 @@ #include "qdeclarativelandmarkcategorymodel_p.h" #include "qgeomapobject.h" +#include "qdeclarativegeoboundingarea_p.h" #include "qdeclarativegeoboundingbox_p.h" #include "qdeclarativegeoboundingcircle_p.h" #include "qdeclarativegeoaddress_p.h" @@ -166,7 +167,9 @@ public: qmlRegisterUncreatableType<QDeclarativeLandmarkFilterBase>(uri, 5, 0, "LandmarkFilterBase", QDeclarativeLandmarkFilterBase::tr("LandmarkFilterBase is an abstract class")); qmlRegisterUncreatableType<QDeclarativeLandmarkAbstractModel>(uri, 5, 0, "LandmarkAbstractModel", QDeclarativeLandmarkAbstractModel::tr("LandmarkAbstractModel is an abstract class")); qmlRegisterType<QDeclarativeCoordinate>(uri, 5, 0, "Coordinate"); + qmlRegisterType<QDeclarativeGeoBoundingArea>(); qmlRegisterType<QDeclarativeGeoBoundingBox>(uri, 5, 0, "BoundingBox"); + qmlRegisterType<QDeclarativeGeoBoundingCircle>(uri, 5, 0, "BoundingCircle"); qmlRegisterType<QDeclarativeGeoPlace>(uri, 5, 0, "Place"); qmlRegisterType<QDeclarativeGeoAddress>(uri, 5, 0, "Address"); @@ -194,7 +197,6 @@ public: qmlRegisterType<QDeclarativeGeoMapRouteObject>(uri, 5, 0, "MapRoute"); // graphical presentation qmlRegisterType<QDeclarativeGeoRouteSegment>(uri, 5, 0, "RouteSegment"); qmlRegisterType<QDeclarativeGeoManeuver>(uri, 5, 0, "RouteManeuver"); - qmlRegisterType<QDeclarativeGeoBoundingCircle>(uri, 5, 0, "BoundingCircle"); qmlRegisterType<QDeclarativeAlternativeValue>(uri, 5, 0, "AlternativeValue"); qmlRegisterType<QDeclarativeBusinessFeature>(uri, 5, 0, "BusinessFeature"); diff --git a/src/imports/location/location.pro b/src/imports/location/location.pro index 6431899a..e6458912 100644 --- a/src/imports/location/location.pro +++ b/src/imports/location/location.pro @@ -47,6 +47,7 @@ HEADERS += qdeclarativeposition_p.h \ qdeclarativegraphicsgeomap_p.h \ qdeclarativegeoplace_p.h \ qdeclarativegeoaddress_p.h \ + qdeclarativegeoboundingarea_p.h \ qdeclarativegeoboundingbox_p.h \ qdeclarativegeocodemodel_p.h \ qdeclarativegeoroutemodel_p.h \ diff --git a/src/imports/location/qdeclarativegeoboundingarea_p.h b/src/imports/location/qdeclarativegeoboundingarea_p.h new file mode 100644 index 00000000..54229e72 --- /dev/null +++ b/src/imports/location/qdeclarativegeoboundingarea_p.h @@ -0,0 +1,64 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +***************************************************************************/ + +#ifndef QDECLARATIVEGEOBOUNDINGAREA_P_H +#define QDECLARATIVEGEOBOUNDINGAREA_P_H + +#include <qgeoboundingarea.h> + +#include <QtCore> +#include <QPointer> +#include <QtDeclarative/qdeclarative.h> + +QTM_BEGIN_NAMESPACE + +class QDeclarativeGeoBoundingArea : public QObject +{ + Q_OBJECT + +public: + QDeclarativeGeoBoundingArea(QObject *parent) :QObject(parent){} +}; + +QTM_END_NAMESPACE +QML_DECLARE_TYPE(QTM_PREPEND_NAMESPACE(QDeclarativeGeoBoundingArea)); + +#endif diff --git a/src/imports/location/qdeclarativegeoboundingbox.cpp b/src/imports/location/qdeclarativegeoboundingbox.cpp index f454877d..d00d0e14 100644 --- a/src/imports/location/qdeclarativegeoboundingbox.cpp +++ b/src/imports/location/qdeclarativegeoboundingbox.cpp @@ -57,12 +57,12 @@ QTM_BEGIN_NAMESPACE */ QDeclarativeGeoBoundingBox::QDeclarativeGeoBoundingBox(QObject* parent) : - QObject(parent), m_height(qQNaN()), m_width(qQNaN()) + QDeclarativeGeoBoundingArea(parent), m_height(qQNaN()), m_width(qQNaN()) { } QDeclarativeGeoBoundingBox::QDeclarativeGeoBoundingBox(const QGeoBoundingBox& box, QObject* parent) : - QObject(parent), + QDeclarativeGeoBoundingArea(parent), m_declarativeBottomLeft(box.bottomLeft()), m_declarativeBottomRight(box.bottomRight()), m_declarativeTopLeft(box.topLeft()), diff --git a/src/imports/location/qdeclarativegeoboundingbox_p.h b/src/imports/location/qdeclarativegeoboundingbox_p.h index 39ea80dc..9a6e8f55 100644 --- a/src/imports/location/qdeclarativegeoboundingbox_p.h +++ b/src/imports/location/qdeclarativegeoboundingbox_p.h @@ -42,6 +42,7 @@ #ifndef QDECLARATIVEGEOBOUNDINGBOX_P_H #define QDECLARATIVEGEOBOUNDINGBOX_P_H +#include "qdeclarativegeoboundingarea_p.h" #include "qdeclarativecoordinate_p.h" #include <qgeoboundingbox.h> @@ -50,7 +51,7 @@ QTM_BEGIN_NAMESPACE -class QDeclarativeGeoBoundingBox : public QObject +class QDeclarativeGeoBoundingBox : public QDeclarativeGeoBoundingArea { Q_OBJECT Q_PROPERTY(QDeclarativeCoordinate* bottomLeft READ bottomLeft WRITE setBottomLeft NOTIFY bottomLeftChanged) diff --git a/src/imports/location/qdeclarativegeoboundingcircle.cpp b/src/imports/location/qdeclarativegeoboundingcircle.cpp index 2ef547b7..be0809cf 100644 --- a/src/imports/location/qdeclarativegeoboundingcircle.cpp +++ b/src/imports/location/qdeclarativegeoboundingcircle.cpp @@ -49,12 +49,12 @@ QTM_BEGIN_NAMESPACE */ QDeclarativeGeoBoundingCircle::QDeclarativeGeoBoundingCircle(QObject* parent) : - QObject(parent) + QDeclarativeGeoBoundingArea(parent) { } QDeclarativeGeoBoundingCircle::QDeclarativeGeoBoundingCircle(const QGeoBoundingCircle& circle, QObject* parent) : - QObject(parent), + QDeclarativeGeoBoundingArea(parent), center_(0), circle_(circle) { diff --git a/src/imports/location/qdeclarativegeoboundingcircle_p.h b/src/imports/location/qdeclarativegeoboundingcircle_p.h index 0dcb625d..d101c677 100644 --- a/src/imports/location/qdeclarativegeoboundingcircle_p.h +++ b/src/imports/location/qdeclarativegeoboundingcircle_p.h @@ -42,6 +42,7 @@ #ifndef QDECLARATIVEGEOBOUNDINGCIRCLE_P_H #define QDECLARATIVEGEOBOUNDINGCIRCLE_P_H +#include "qdeclarativegeoboundingarea_p.h" #include "qdeclarativecoordinate_p.h" #include <qgeoboundingcircle.h> @@ -51,7 +52,7 @@ QTM_BEGIN_NAMESPACE -class QDeclarativeGeoBoundingCircle : public QObject +class QDeclarativeGeoBoundingCircle : public QDeclarativeGeoBoundingArea { Q_OBJECT Q_PROPERTY(QDeclarativeCoordinate* center READ center WRITE setCenter NOTIFY centerChanged) |