/**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: http://www.qt-project.org/ ** ** This file is part of the QtLocation module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage ** 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. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU General ** Public License version 3.0 as published by the Free Software Foundation ** and appearing in the file LICENSE.GPL included in the packaging of this ** file. Please review the following information to ensure the GNU General ** Public License version 3.0 requirements will be met: ** http://www.gnu.org/copyleft/gpl.html. ** ** Other Usage ** Alternatively, this file may be used in accordance with the terms and ** conditions contained in a signed written agreement between you and Nokia. ** ** ** ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #include "qdeclarativepositionsource_p.h" #include "qdeclarativeposition_p.h" #include "qdeclarativegeoboundingarea_p.h" #include "qdeclarativegeoboundingbox_p.h" #include "qdeclarativegeoboundingcircle_p.h" #include "qdeclarativegeoaddress_p.h" #include "qdeclarativecoordinate_p.h" #include "qdeclarativegeoserviceprovider_p.h" #include "qdeclarativegeomap_p.h" #include "qdeclarativegeomapmousearea_p.h" #include "qdeclarativegeomapmouseevent_p.h" #include "qdeclarativegeoroute_p.h" #include "qdeclarativegeoroutemodel_p.h" #include "qdeclarativegeocodemodel_p.h" #include "qdeclarativegeomaneuver_p.h" #include "qdeclarativegeomapflickable_p.h" #include "qdeclarativegeomappincharea_p.h" #include "qdeclarativegeomapquickitem_p.h" #include "qdeclarativegeomapitemview_p.h" #include "qdeclarativegeomaptype_p.h" #include "qdeclarativerectanglemapitem_p.h" #include "qdeclarativecirclemapitem_p.h" #include "qdeclarativeroutemapitem_p.h" #include "qdeclarativepolylinemapitem_p.h" #include "qdeclarativepolygonmapitem_p.h" //Place includes #include "qdeclarativecategory_p.h" #include "qdeclarativegeolocation_p.h" #include "qdeclarativeplace_p.h" #include "qdeclarativeplaceattribute_p.h" #include "qdeclarativeplaceicon_p.h" #include "qdeclarativeratings_p.h" #include "qdeclarativesupplier_p.h" #include "qdeclarativeplaceuser_p.h" #include "qdeclarativecontactdetail_p.h" #include "qdeclarativerecommendationmodel_p.h" #include "qdeclarativesupportedcategoriesmodel_p.h" #include "qdeclarativesearchresultmodel_p.h" #include "qdeclarativesearchsuggestionmodel_p.h" #include #include #include #include QT_BEGIN_NAMESPACE class QLocationDeclarativeModule: public QDeclarativeExtensionPlugin { Q_OBJECT public: virtual void registerTypes(const char* uri) { if (QLatin1String(uri) == QLatin1String("QtMobility.location")) { qWarning("QtMobility.location is not supported. Use QtLocation instead."); } else if (QLatin1String(uri) == QLatin1String("Qt.location")) { qWarning("Qt.location is not supported. Use QtLocation instead."); } else if (QLatin1String(uri) == QLatin1String("QtLocation")) { // @uri QtLocation 5.0 qmlRegisterType(uri, 5, 0, "Position"); qmlRegisterType(uri, 5, 0, "PositionSource"); qmlRegisterType(uri, 5, 0, "Coordinate"); qmlRegisterUncreatableType(uri, 5, 0, "BoundingArea", QDeclarativeGeoBoundingArea::tr("(Positioning)BoundingArea is not intended instantiable by developer.")); qmlRegisterType(uri, 5, 0, "BoundingBox"); qmlRegisterType(uri, 5, 0, "BoundingCircle"); qmlRegisterType(uri, 5, 0, "Address"); qmlRegisterType(uri, 5, 0, "Plugin"); qmlRegisterType(uri, 5, 0, "PluginParameter"); qmlRegisterType(uri, 5, 0, "Map"); qmlRegisterUncreatableType(uri, 5, 0, "GeoMapItemBase",QDeclarativeGeoMapItemBase::tr("GeoMapItemBase is not intended instantiable by developer.")); qmlRegisterType(uri, 5, 0, "MapQuickItem"); qmlRegisterType(uri, 5, 0, "MapItemView"); qmlRegisterType(uri, 5, 0, "MapMouseArea"); qmlRegisterType(uri, 5, 0, "MapMouseEvent"); qmlRegisterType(uri, 5, 0, "GeocodeModel"); // geocoding and reverse geocoding qmlRegisterType(uri, 5, 0, "RouteModel"); qmlRegisterType(uri, 5, 0, "RouteQuery"); qmlRegisterType(uri, 5, 0, "Route"); // data type qmlRegisterType(uri, 5, 0, "RouteSegment"); qmlRegisterType(uri, 5, 0, "RouteManeuver"); qmlRegisterUncreatableType(uri, 5, 0, "MapFlickable", QDeclarativeGeoMapFlickable::tr("(Map)Flickable is not intended instantiable by developer.")); qmlRegisterUncreatableType(uri, 5, 0, "MapPinchArea", QDeclarativeGeoMapPinchArea::tr("(Map)PinchArea is not intended instantiable by developer.")); qmlRegisterUncreatableType(uri, 5, 0, "MapPinchEvent", QDeclarativeGeoMapPinchEvent::tr("(Map)PinchEvent is not intended instantiable by developer.")); qmlRegisterUncreatableType(uri, 5, 0, "MapType",QDeclarativeGeoMapType::tr("MapType is not intended instantiable by developer.")); qmlRegisterType(uri, 5, 0, "Category"); qmlRegisterType(uri, 5, 0, "EditorialModel"); qmlRegisterType(uri, 5, 0, "Location"); qmlRegisterType(uri, 5, 0, "ImageModel"); qmlRegisterType(uri, 5, 0, "Place"); qmlRegisterType(uri, 5, 0, "Icon"); qmlRegisterType(uri, 5, 0, "Ratings"); qmlRegisterType(uri, 5, 0, "ReviewModel"); qmlRegisterType(uri, 5, 0, "Supplier"); qmlRegisterType(uri, 5, 0, "User"); qmlRegisterType(uri, 5, 0, "MapRectangle"); qmlRegisterType(uri, 5, 0, "MapCircle"); qmlRegisterType(); qmlRegisterType(uri, 5, 0, "MapPolyline"); qmlRegisterType(uri, 5, 0, "MapPolygon"); qmlRegisterType(uri, 5, 0, "MapRoute"); qmlRegisterType(uri, 5, 0, "PlaceRecommendationModel"); qmlRegisterType(uri, 5, 0, "CategoryModel"); qmlRegisterType(uri, 5, 0, "PlaceSearchModel"); qmlRegisterType(uri, 5, 0, "PlaceSearchSuggestionModel"); qmlRegisterType(uri, 5,0, "PlaceAttribute"); qmlRegisterType(uri, 5, 0, "ContactDetail"); qRegisterMetaType("QGeoCoordinate"); qRegisterMetaType("QGeoAddress"); qRegisterMetaType("QGeoBoundingBox"); qRegisterMetaType("QGeoBoundingCircle"); qRegisterMetaType("QGeoLocation"); qRegisterMetaType("QPlaceCategory"); qRegisterMetaType("QPlace"); qRegisterMetaType("QPlaceIcon"); qRegisterMetaType("QPlaceRatings"); qRegisterMetaType("QPlaceSupplier"); qRegisterMetaType("QPlaceUser"); qRegisterMetaType("QPlaceAttribute"); qRegisterMetaType("QPlaceContactDetail"); } else { qDebug() << "Unsupported URI given to load location QML plugin: " << QLatin1String(uri); } } }; #include "location.moc" QT_END_NAMESPACE Q_EXPORT_PLUGIN2(declarative_location, QT_PREPEND_NAMESPACE(QLocationDeclarativeModule));