Skip to content

Commit

Permalink
Merge branch 'heregeoservice' into 'mer-stable-on-5.6'
Browse files Browse the repository at this point in the history
[QtLocation] Rename Nokia geoservices plugin to HERE and port to new APIs. Contributes to JB#36270



See merge request !5
  • Loading branch information
chriadam committed Nov 2, 2016
2 parents 86a277e + 46b58a7 commit 93819e2
Show file tree
Hide file tree
Showing 129 changed files with 2,923 additions and 2,878 deletions.
10 changes: 5 additions & 5 deletions examples/location/mapviewer/content/map/MapComponent.qml
Expand Up @@ -123,7 +123,7 @@ Map {
}

MapQuickItem {
id: poiNokia
id: poiBrisbaneOffice
sourceItem: Rectangle { width: 14; height: 14; color: "#1c94fc"; border.width: 2; border.color: "#242424"; smooth: true; radius: 7 }
coordinate {
latitude: -27.5796
Expand All @@ -136,15 +136,15 @@ Map {

MapQuickItem {
sourceItem: Text{
text: "Nokia"
text: "Brisbane Office"
color:"#242424"
font.bold: true
styleColor: "#ECECEC"
style: Text.Outline
}
coordinate: poiNokia.coordinate
anchorPoint.x: -poiNokia.sourceItem.width * 0.5
anchorPoint.y: poiNokia.sourceItem.height * 1.5
coordinate: poiBrisbaneOffice.coordinate
anchorPoint.x: -poiBrisbaneOffice.sourceItem.width * 0.5
anchorPoint.y: poiBrisbaneOffice.sourceItem.height * 1.5
}


Expand Down
2 changes: 1 addition & 1 deletion examples/location/mapviewer/mapviewer.qml
Expand Up @@ -488,7 +488,7 @@ Item {

/* GeocodeModel {
id: geocodeModel
plugin : Plugin { name : "nokia"}
plugin : Plugin { name : "here"}
onLocationsChanged: {
if (geocodeModel.count > 0) {
console.log('setting the coordinate as locations changed in model.')
Expand Down
4 changes: 2 additions & 2 deletions examples/location/places/places.qml
Expand Up @@ -96,8 +96,8 @@ Item {
for (var i = 0; i<plugins.length; i++) {
addItem(plugins[i]);

// default to nokia plugin
if (plugins[i] === "nokia")
// default to HERE plugin
if (plugins[i] === "here")
exclusiveButton = plugins[i];
}

Expand Down
4 changes: 2 additions & 2 deletions examples/location/places_list/places_list.qml
Expand Up @@ -52,8 +52,8 @@ Rectangle {
//! [Initialize Plugin]
Plugin {
id: myPlugin
name: "nokia"
//specify plugin parameters as necessary
name: "here"
//specify plugin parameters as necessary, e.g. app_id and app_code
//PluginParameter {...}
//PluginParameter {...}
//...
Expand Down
4 changes: 2 additions & 2 deletions examples/location/places_map/places_map.qml
Expand Up @@ -51,8 +51,8 @@ Rectangle {
//! [Initialize Plugin]
Plugin {
id: myPlugin
name: "nokia"
//specify plugin parameters if necessary
name: "here"
//specify plugin parameters if necessary, e.g. app_id and app_code
//PluginParameter {...}
//PluginParameter {...}
//...
Expand Down
16 changes: 8 additions & 8 deletions rpm/qtlocation.spec
Expand Up @@ -94,15 +94,15 @@ This package contains the files necessary to develop
applications that use QtLocation


%package -n qt5-plugin-geoservices-nokia
Summary: Qt Geoservices plugin for Nokia devices
%package -n qt5-plugin-geoservices-here
Summary: Qt Geoservices plugin using HERE location services
Group: Qt/Qt
Requires: qt5-qtlocation = %{version}-%{release}
Obsoletes: qt5-qtlocation-plugin-geoservices-nokia <= 5.1.0+git7
Provides: qt5-qtlocation-plugin-geoservices-nokia > 5.1.0+git7
Obsoletes: qt5-qtlocation-plugin-geoservices-nokia
Provides: qt5-qtlocation-plugin-geoservices-here

%description -n qt5-plugin-geoservices-nokia
This package contains the geoservices plugin for Nokia devices
%description -n qt5-plugin-geoservices-here
This package contains the geoservices plugin using HERE location services


%package -n qt5-plugin-geoservices-osm
Expand Down Expand Up @@ -207,9 +207,9 @@ find %{buildroot}%{_libdir} -type f -name '*.prl' \
%{_datadir}/qt5/mkspecs/modules/qt_lib_location_private.pri
%{_libdir}/cmake/Qt5Location/

%files -n qt5-plugin-geoservices-nokia
%files -n qt5-plugin-geoservices-here
%defattr(-,root,root,-)
%{_libdir}/qt5/plugins/geoservices/*nokia*
%{_libdir}/qt5/plugins/geoservices/*here*

%files -n qt5-plugin-geoservices-osm
%defattr(-,root,root,-)
Expand Down
Expand Up @@ -72,7 +72,7 @@
\li x_provider
\li The name of the provider that a place is sourced from
\row
\li x_id_<provider> (for example x_id_nokia)
\li x_id_<provider> (for example x_id_here)
\li An alternative identifier which identifies the place from the
perspective of the specified provider.
\endtable
Expand Down
2 changes: 1 addition & 1 deletion src/imports/location/qdeclarativegeoroutemodel.cpp
Expand Up @@ -97,7 +97,7 @@ QT_BEGIN_NAMESPACE
\code
Plugin {
id: aPlugin
name: "nokia"
name: "here"
}
RouteQuery {
Expand Down
10 changes: 5 additions & 5 deletions src/imports/location/qdeclarativegeoserviceprovider.cpp
Expand Up @@ -76,12 +76,12 @@ QT_BEGIN_NAMESPACE
The following snippet shows a Plugin object being created with the
\l required and \l preferred properties set. This Plugin will attach to the
first plugin found plugin that supports both mapping and geocoding, and will
prefer plugins named "nokia" or "foo" to any others.
prefer plugins named "here" or "foo" to any others.
\code
Plugin {
id: plugin
preferred: ["nokia", "foo"]
preferred: ["here", "foo"]
required: Plugin.AnyMappingFeatures | Plugin.AnyGeocodingFeatures
}
\endcode
Expand Down Expand Up @@ -761,14 +761,14 @@ bool QDeclarativeGeoServiceProviderRequirements::matches(const QGeoServiceProvid
\section2 Example Usage
The following example shows an instantiation of the \l {Qt Location Nokia Plugin}{Nokia} plugin
The following example shows an instantiation of the \l {Qt Location HERE Plugin}{HERE} plugin
with a mapping API \e app_id and \e token pair specific to the application.
\code
Plugin {
name: "nokia"
name: "here"
PluginParameter { name: "app_id"; value: "EXAMPLE_API_ID" }
PluginParameter { name: "token"; value: "EXAMPLE_TOKEN_123" }
PluginParameter { name: "app_code"; value: "EXAMPLE_API_CODE_123" }
}
\endcode
*/
Expand Down
2 changes: 1 addition & 1 deletion src/location/doc/qtlocation.qdocconf
Expand Up @@ -43,7 +43,7 @@ headerdirs += .. \

sourcedirs += .. \
../../imports/location \
../../plugins/geoservices/nokia
../../plugins/geoservices/here

examplesinstallpath = location

Expand Down
4 changes: 2 additions & 2 deletions src/location/doc/snippets/declarative/places_loader.qml
Expand Up @@ -48,8 +48,8 @@ Rectangle {

Plugin {
id: myPlugin
name: "nokia"
//specify plugin parameters if necessary
name: "here"
//specify plugin parameters if necessary, e.g. app_id and app_code
//PluginParameter {...}
//PluginParameter {...}
//...
Expand Down
Expand Up @@ -94,7 +94,7 @@ Item {
//![MapObjectView]
Map {
id: map
plugin : Plugin { name : "nokia" }
plugin : Plugin { name : "here" }
anchors.fill: parent; size.width: parent.width; size.height: parent.height; zoomLevel: 12
center: myPositionSource.position.coordinate

Expand Down
2 changes: 1 addition & 1 deletion src/location/doc/snippets/places/requesthandler.h
Expand Up @@ -295,7 +295,7 @@ class RequestHandler : public QObject
QPlaceMatchRequest request;
request.setResults(results);
QVariantMap parameters;
parameters.insert(QPlaceMatchRequest::AlternativeId, "x_id_nokia");
parameters.insert(QPlaceMatchRequest::AlternativeId, "x_id_here");
request.setParameters(parameters);
matchReply = manager->matchingPlaces(request);
//! [Match places]
Expand Down
8 changes: 4 additions & 4 deletions src/location/doc/src/examples/declarative-mapviewer.qdoc
Expand Up @@ -47,8 +47,8 @@
\endcode

Refer to the documentation for each of the geo services plugins for details on what plugin
parameters they support. The Nokia services plugin supplied with Qt requires an \e app_id and
\e token pair. See "\l {Qt Location Nokia Plugin}" for details.
parameters they support. The HERE services plugin supplied with Qt requires an \e app_id and
\e app_code pair. See "\l {Qt Location HERE Plugin}" for details.

QML types shown in this example:

Expand Down Expand Up @@ -93,8 +93,8 @@
a mouse.

As we do not specify a plugin for supplying map data, the platform default
will be used. This is typically the "nokia" plugin, which provides data from
Nokia services. Additional licensing conditions do apply to the use of this data,
will be used. This is typically the "here" plugin, which provides data from
HERE services. Additional licensing conditions do apply to the use of this data,
please see the documentation for further details.

\section2 Finding an Address (Geocoding)
Expand Down
4 changes: 2 additions & 2 deletions src/location/doc/src/examples/declarative-places.qdoc
Expand Up @@ -70,8 +70,8 @@
\endcode

Refer to the documentation for each of the geo services plugins for details on what plugin
parameters they support. The Nokia services plugin supplied with Qt requires an \e app_id and
\e token pair. See "\l {Qt Location Nokia Plugin}" for details.
parameters they support. The HERE services plugin supplied with Qt requires an \e app_id and
\e app_code pair. See "\l {Qt Location HERE Plugin}" for details.

\section1 Displaying Categories

Expand Down
4 changes: 2 additions & 2 deletions src/location/doc/src/examples/places-list.qdoc
Expand Up @@ -39,9 +39,9 @@
\snippet places_list/places_list.qml Imports

Instantiate a \l Plugin instance. The \l Plugin is effectively the backend
from where places are sourced from. Because the \c nokia plugin has been
from where places are sourced from. Because the \c here plugin has been
specified, some mandatory parameters need to be filled in, see the \l
{Mandatory Parameters} {Nokia Plugin} documentation for details:
{Mandatory Parameters} {HERE Plugin} documentation for details:

\snippet places_list/places_list.qml Initialize Plugin

Expand Down
4 changes: 2 additions & 2 deletions src/location/doc/src/examples/places-map.qdoc
Expand Up @@ -40,9 +40,9 @@
\snippet places_map/places_map.qml Imports

Instantiate a \l Plugin instance. The \l Plugin is effectively the backend
from where places are sourced from. Because the \c nokia plugin has been
from where places are sourced from. Because the \c here plugin has been
specified, some mandatory parameters need to be filled in, see the \l
{Mandatory Parameters} {Nokia Plugin} documentation for details:
{Mandatory Parameters} {HERE Plugin} documentation for details:

\snippet places_map/places_map.qml Initialize Plugin

Expand Down
6 changes: 3 additions & 3 deletions src/location/doc/src/place-crossref.qdocinc
@@ -1,7 +1,7 @@
\code
origin R/O manager(nokia) destination R/W manager (places_jsondb)
origin R/O manager(here) destination R/W manager (places_jsondb)
Save
Place id: ae246 ---> Place id: 0001
Attribute type: x_provider Attribute type: x_id_nokia
Attribute value: nokia Attribute text value: ae246
Attribute type: x_provider Attribute type: x_id_here
Attribute value: here Attribute text value: ae246
\endcode
12 changes: 6 additions & 6 deletions src/location/doc/src/places.qdoc
Expand Up @@ -42,7 +42,7 @@
\section2 Plugin
A \l Plugin is an abstraction for a backend. One \l Plugin might access places from a
REST server while another may access places from a local database. The following
instantiates a \l Plugin object by providing a name of "nokia". The \l Plugin name
instantiates a \l Plugin object by providing a name of "here". The \l Plugin name
identifies which backend to choose from. Plugins may also be provided with a set of
\l {PluginParameter} {parameters}, which essentially takes the form of a set of
key-value pairs. The \l {PluginParameter} {parameters} that can be specified vary
Expand All @@ -52,8 +52,8 @@

\snippet places_list/places_list.qml Initialize Plugin

\note The Nokia plugin must be supplied with some mandatory parameters as outlined
in the \l {Mandatory Parameters} {Nokia Plugin} documentation.
\note The HERE plugin must be supplied with some mandatory parameters as outlined
in the \l {Mandatory Parameters} {HERE Plugin} documentation.

\section2 Models, Views and Delegates
The QML Places API is built around the notion of models, views and delegates.
Expand Down Expand Up @@ -398,8 +398,8 @@

The matching mechanism can vary between managers, but is typically accomplished through an alternative identifier.
As part of the save process, the place identifier from the origin manager is saved as an alternative identifier attribute in the destination manager
(which can have its own place identifier scheme). In the following example, the origin manager is from the 'nokia' QGeoServiceProider, therefore
as part of the saving process an alternative identifier attribute, x_id_nokia, is set for the place saved into the destination manager
(which can have its own place identifier scheme). In the following example, the origin manager is from the 'here' QGeoServiceProider, therefore
as part of the saving process an alternative identifier attribute, x_id_here, is set for the place saved into the destination manager
(when QPlaceManager::compatiblePlace() is called)

\input place-crossref.qdocinc
Expand All @@ -408,7 +408,7 @@
The QPlaceMatchRequest will be used on the destination manager to return corresponding places. We also specify
matching parameters which are key value pairs. As mentioned previously, this can vary depending on the manager but typically
the key is QPlaceMatchRequest::AlternativeId to indicate we are matching by alternative id, the value in this case would be
x_id_nokia which specifies which alternative identifier attribute we are using to do the matching.
x_id_here which specifies which alternative identifier attribute we are using to do the matching.

\snippet places/requesthandler.h Match places
\dots
Expand Down

0 comments on commit 93819e2

Please sign in to comment.