summaryrefslogtreecommitdiff
path: root/src/imports
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports')
-rw-r--r--src/imports/location/plugins.qmltypes136
-rw-r--r--src/imports/location/qdeclarativegeocodemodel.cpp43
-rw-r--r--src/imports/location/qdeclarativegeocodemodel_p.h17
-rw-r--r--src/imports/location/qdeclarativegeomap.cpp3
-rw-r--r--src/imports/location/qdeclarativegeoroutemodel.cpp41
-rw-r--r--src/imports/location/qdeclarativegeoroutemodel_p.h11
-rw-r--r--src/imports/location/qquickgeomapgesturearea.cpp4
-rw-r--r--src/imports/positioning/plugins.qmltypes29
8 files changed, 170 insertions, 114 deletions
diff --git a/src/imports/location/plugins.qmltypes b/src/imports/location/plugins.qmltypes
index 5b2a72ea..105e8713 100644
--- a/src/imports/location/plugins.qmltypes
+++ b/src/imports/location/plugins.qmltypes
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.2
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable QtLocation 5.5'
+// 'qmlplugindump -nonrelocatable QtLocation 5.6'
Module {
dependencies: []
@@ -392,12 +392,7 @@ Module {
prototype: "QQuickItem"
exports: ["QtLocation/Map 5.0"]
exportMetaObjectRevisions: [0]
- Property {
- name: "gesture"
- type: "QDeclarativeGeoMapGestureArea"
- isReadonly: true
- isPointer: true
- }
+ Property { name: "gesture"; type: "QQuickGeoMapGestureArea"; isReadonly: true; isPointer: true }
Property { name: "plugin"; type: "QDeclarativeGeoServiceProvider"; isPointer: true }
Property { name: "minimumZoomLevel"; type: "double" }
Property { name: "maximumZoomLevel"; type: "double" }
@@ -443,6 +438,18 @@ Module {
name: "toCoordinate"
type: "QGeoCoordinate"
Parameter { name: "position"; type: "QPointF" }
+ Parameter { name: "clipToViewPort"; type: "bool" }
+ }
+ Method {
+ name: "toCoordinate"
+ type: "QGeoCoordinate"
+ Parameter { name: "position"; type: "QPointF" }
+ }
+ Method {
+ name: "fromCoordinate"
+ type: "QPointF"
+ Parameter { name: "coordinate"; type: "QGeoCoordinate" }
+ Parameter { name: "clipToViewPort"; type: "bool" }
}
Method {
name: "fromCoordinate"
@@ -467,57 +474,6 @@ Module {
Method { name: "prefetchData" }
}
Component {
- name: "QDeclarativeGeoMapGestureArea"
- prototype: "QObject"
- exports: ["QtLocation/MapGestureArea 5.0"]
- isCreatable: false
- exportMetaObjectRevisions: [0]
- Enum {
- name: "ActiveGesture"
- values: {
- "NoGesture": 0,
- "ZoomGesture": 1,
- "PanGesture": 2,
- "FlickGesture": 4
- }
- }
- Enum {
- name: "ActiveGestures"
- values: {
- "NoGesture": 0,
- "ZoomGesture": 1,
- "PanGesture": 2,
- "FlickGesture": 4
- }
- }
- Property { name: "enabled"; type: "bool" }
- Property { name: "pinchEnabled"; type: "bool" }
- Property { name: "panEnabled"; type: "bool" }
- Property { name: "isPinchActive"; type: "bool"; isReadonly: true }
- Property { name: "isPanActive"; type: "bool"; isReadonly: true }
- Property { name: "activeGestures"; type: "ActiveGestures" }
- Property { name: "maximumZoomLevelChange"; type: "double" }
- Property { name: "flickDeceleration"; type: "double" }
- Signal { name: "panActiveChanged" }
- Signal { name: "pinchActiveChanged" }
- Signal {
- name: "pinchStarted"
- Parameter { name: "pinch"; type: "QDeclarativeGeoMapPinchEvent"; isPointer: true }
- }
- Signal {
- name: "pinchUpdated"
- Parameter { name: "pinch"; type: "QDeclarativeGeoMapPinchEvent"; isPointer: true }
- }
- Signal {
- name: "pinchFinished"
- Parameter { name: "pinch"; type: "QDeclarativeGeoMapPinchEvent"; isPointer: true }
- }
- Signal { name: "panStarted" }
- Signal { name: "panFinished" }
- Signal { name: "flickStarted" }
- Signal { name: "flickFinished" }
- }
- Component {
name: "QDeclarativeGeoMapItemBase"
defaultProperty: "data"
prototype: "QQuickItem"
@@ -620,7 +576,9 @@ Module {
"CommunicationError": 2,
"ParseError": 3,
"UnsupportedOptionError": 4,
- "UnknownError": 5
+ "UnknownError": 5,
+ "UnknownParameterError": 100,
+ "MissingRequiredParameterError": 101
}
}
Property { name: "plugin"; type: "QDeclarativeGeoServiceProvider"; isPointer: true }
@@ -1023,7 +981,9 @@ Module {
"ParseError": 3,
"UnsupportedOptionError": 4,
"CombinationError": 5,
- "UnknownError": 6
+ "UnknownError": 6,
+ "UnknownParameterError": 100,
+ "MissingRequiredParameterError": 101
}
}
Property { name: "plugin"; type: "QDeclarativeGeoServiceProvider"; isPointer: true }
@@ -1426,6 +1386,62 @@ Module {
Method { name: "keys"; type: "QStringList" }
}
Component {
+ name: "QQuickGeoMapGestureArea"
+ defaultProperty: "data"
+ prototype: "QQuickItem"
+ exports: [
+ "QtLocation/MapGestureArea 5.0",
+ "QtLocation/MapGestureArea 5.6"
+ ]
+ isCreatable: false
+ exportMetaObjectRevisions: [0, 1]
+ Enum {
+ name: "ActiveGesture"
+ values: {
+ "NoGesture": 0,
+ "ZoomGesture": 1,
+ "PanGesture": 2,
+ "FlickGesture": 4
+ }
+ }
+ Enum {
+ name: "ActiveGestures"
+ values: {
+ "NoGesture": 0,
+ "ZoomGesture": 1,
+ "PanGesture": 2,
+ "FlickGesture": 4
+ }
+ }
+ Property { name: "enabled"; type: "bool" }
+ Property { name: "pinchEnabled"; type: "bool" }
+ Property { name: "panEnabled"; type: "bool" }
+ Property { name: "isPinchActive"; type: "bool"; isReadonly: true }
+ Property { name: "isPanActive"; type: "bool"; isReadonly: true }
+ Property { name: "activeGestures"; type: "ActiveGestures" }
+ Property { name: "maximumZoomLevelChange"; type: "double" }
+ Property { name: "flickDeceleration"; type: "double" }
+ Property { name: "preventStealing"; revision: 1; type: "bool" }
+ Signal { name: "panActiveChanged" }
+ Signal { name: "pinchActiveChanged" }
+ Signal {
+ name: "pinchStarted"
+ Parameter { name: "pinch"; type: "QDeclarativeGeoMapPinchEvent"; isPointer: true }
+ }
+ Signal {
+ name: "pinchUpdated"
+ Parameter { name: "pinch"; type: "QDeclarativeGeoMapPinchEvent"; isPointer: true }
+ }
+ Signal {
+ name: "pinchFinished"
+ Parameter { name: "pinch"; type: "QDeclarativeGeoMapPinchEvent"; isPointer: true }
+ }
+ Signal { name: "panStarted" }
+ Signal { name: "panFinished" }
+ Signal { name: "flickStarted" }
+ Signal { name: "flickFinished" }
+ }
+ Component {
name: "QQuickItem"
defaultProperty: "data"
prototype: "QObject"
diff --git a/src/imports/location/qdeclarativegeocodemodel.cpp b/src/imports/location/qdeclarativegeocodemodel.cpp
index d2599747..d8ff4e85 100644
--- a/src/imports/location/qdeclarativegeocodemodel.cpp
+++ b/src/imports/location/qdeclarativegeocodemodel.cpp
@@ -150,7 +150,7 @@ void QDeclarativeGeocodeModel::update()
return;
if (!plugin_) {
- setError(NotSupportedError, tr("Cannot geocode, plugin not set."));
+ setError(EngineNotSetError, tr("Cannot geocode, plugin not set."));
return;
}
@@ -160,7 +160,7 @@ void QDeclarativeGeocodeModel::update()
QGeoCodingManager *geocodingManager = serviceProvider->geocodingManager();
if (!geocodingManager) {
- setError(NotSupportedError, tr("Cannot geocode, geocode manager not set."));
+ setError(EngineNotSetError, tr("Cannot geocode, geocode manager not set."));
return;
}
if (!coordinate_.isValid() && (!address_ || address_->address().isEmpty()) &&
@@ -292,13 +292,26 @@ void QDeclarativeGeocodeModel::pluginReady()
QGeoCodingManager *geocodingManager = serviceProvider->geocodingManager();
if (serviceProvider->error() != QGeoServiceProvider::NoError) {
- setError(GeocodeError(serviceProvider->error() + NotSupportedError - 1),
- serviceProvider->errorString());
+ QDeclarativeGeocodeModel::GeocodeError newError = UnknownError;
+ switch (serviceProvider->error()) {
+ case QGeoServiceProvider::NotSupportedError:
+ newError = EngineNotSetError; break;
+ case QGeoServiceProvider::UnknownParameterError:
+ newError = UnknownParameterError; break;
+ case QGeoServiceProvider::MissingRequiredParameterError:
+ newError = MissingRequiredParameterError; break;
+ case QGeoServiceProvider::ConnectionError:
+ newError = CommunicationError; break;
+ default:
+ break;
+ }
+
+ setError(newError, serviceProvider->errorString());
return;
}
if (!geocodingManager) {
- setError(NotSupportedError,tr("Plugin does not support (reverse) geocoding."));
+ setError(EngineNotSetError,tr("Plugin does not support (reverse) geocoding."));
return;
}
@@ -432,13 +445,17 @@ void QDeclarativeGeocodeModel::setStatus(QDeclarativeGeocodeModel::Status status
This read-only property holds the latest error value of the geocoding request.
\list
- \li GeocodeModel.NoError - No error has occurred
- \li GeocodeModel.EngineNotSetError - The plugin/service provider used does not support (reverse) geocoding
- \li GeocodeModel.CommunicationError - An error occurred while communicating with the service provider
- \li GeocodeModel.ParseError - The response from the service provider was in an unrecognizable format
- \li GeocodeModel.UnsupportedOptionError - The requested operation or one of the options for the operation are not supported by the service provider.
- \li GeocodeModel.CombinationError - An error occurred while results where being combined from multiple sources
- \li GeocodeModel.UnknownError - An error occurred which does not fit into any of the other categories
+ \li GeocodeModel.NoError - No error has occurred.
+ \li GeocodeModel.CombinationError - An error occurred while results where being combined from multiple sources.
+ \li GeocodeModel.CommunicationError - An error occurred while communicating with the service provider.
+ \li GeocodeModel.EngineNotSetError - The model's plugin property was not set or there is no geocoding manager associated with the plugin.
+ \li GeocodeModel.MissingRequiredParameterError - A required parameter was not specified.
+ \li GeocodeModel.ParseError - The response from the service provider was in an unrecognizable format.
+ \li GeocodeModel.UnknownError - An error occurred which does not fit into any of the other categories.
+ \li GeocodeModel.UnknownParameterError - The plugin did not recognize one of the parameters it was given.
+ \li GeocodeModel.UnsupportedOptionError - The requested operation is not supported by the geocoding provider.
+ This may happen when the loaded engine does not support a particular geocoding request
+ such as reverse geocoding.
\endlist
*/
@@ -512,7 +529,7 @@ int QDeclarativeGeocodeModel::count() const
QDeclarativeGeoLocation *QDeclarativeGeocodeModel::get(int index)
{
if (index < 0 || index >= declarativeLocations_.count()) {
- setError(UnsupportedOptionError, QCoreApplication::translate(CONTEXT_NAME, INDEX_OUT_OF_RANGE).arg(index));
+ qmlInfo(this) << QStringLiteral("Index '%1' out of range").arg(index);
return 0;
}
return declarativeLocations_.at(index);
diff --git a/src/imports/location/qdeclarativegeocodemodel_p.h b/src/imports/location/qdeclarativegeocodemodel_p.h
index 5d6b27a7..cb610bb0 100644
--- a/src/imports/location/qdeclarativegeocodemodel_p.h
+++ b/src/imports/location/qdeclarativegeocodemodel_p.h
@@ -82,18 +82,17 @@ public:
enum GeocodeError {
NoError = QGeoCodeReply::NoError,
- EngineNotSetError = QGeoCodeReply::EngineNotSetError,
- CommunicationError = QGeoCodeReply::CommunicationError,
+ EngineNotSetError = QGeoCodeReply::EngineNotSetError, //TODO Qt6 consider merge with NotSupportedError
+ CommunicationError = QGeoCodeReply::CommunicationError, //TODO Qt6 merge with Map's ConnectionError
ParseError = QGeoCodeReply::ParseError,
- UnsupportedOptionError = QGeoCodeReply::UnsupportedOptionError,
+ UnsupportedOptionError = QGeoCodeReply::UnsupportedOptionError, //TODO Qt6 consider rename UnsupportedOperationError
CombinationError = QGeoCodeReply::CombinationError,
UnknownError = QGeoCodeReply::UnknownError,
- //here we leave gap for future model errors
- //now geo service provider errors
- NotSupportedError = 100 + QGeoServiceProvider::NotSupportedError,
- UnknownParameterError = 100 + QGeoServiceProvider::UnknownParameterError,
- MissingRequiredParameterError = 100 + QGeoServiceProvider::MissingRequiredParameterError,
- ConnectionError = 100 + QGeoServiceProvider::ConnectionError
+ //we leave gap for future QGeoCodeReply errors
+
+ //QGeoServiceProvider related errors start here
+ UnknownParameterError = 100,
+ MissingRequiredParameterError
};
enum Roles {
diff --git a/src/imports/location/qdeclarativegeomap.cpp b/src/imports/location/qdeclarativegeomap.cpp
index cf492977..87023708 100644
--- a/src/imports/location/qdeclarativegeomap.cpp
+++ b/src/imports/location/qdeclarativegeomap.cpp
@@ -283,6 +283,7 @@ void QDeclarativeGeoMap::pluginReady()
}
if (!m_mappingManager) {
+ //TODO Should really be EngineNotSetError (see QML GeoCodeModel)
setError(QGeoServiceProvider::NotSupportedError, tr("Plugin does not support mapping."));
return;
}
@@ -917,7 +918,7 @@ QString QDeclarativeGeoMap::errorString() const
\list
\li Map.NoError - No error has occurred.
- \li Map.NotSupportedError -The plugin does not support mapping functionality.
+ \li Map.NotSupportedError -The maps plugin property was not set or there is no mapping manager associated with the plugin.
\li Map.UnknownParameterError -The plugin did not recognize one of the parameters it was given.
\li Map.MissingRequiredParameterError - The plugin did not find one of the parameters it was expecting.
\li Map.ConnectionError - The plugin could not connect to its backend service or database.
diff --git a/src/imports/location/qdeclarativegeoroutemodel.cpp b/src/imports/location/qdeclarativegeoroutemodel.cpp
index 87023c15..0c64c23a 100644
--- a/src/imports/location/qdeclarativegeoroutemodel.cpp
+++ b/src/imports/location/qdeclarativegeoroutemodel.cpp
@@ -212,7 +212,7 @@ void QDeclarativeGeoRouteModel::abortRequest()
QDeclarativeGeoRoute *QDeclarativeGeoRouteModel::get(int index)
{
if (index < 0 || index >= routes_.count()) {
- setError(UnsupportedOptionError, QCoreApplication::translate(CONTEXT_NAME, INDEX_OUT_OF_RANGE).arg(index));
+ qmlInfo(this) << QStringLiteral("Index '%1' out of range").arg(index);
return 0;
}
return routes_.at(index);
@@ -307,13 +307,26 @@ void QDeclarativeGeoRouteModel::pluginReady()
QGeoRoutingManager *routingManager = serviceProvider->routingManager();
if (serviceProvider->error() != QGeoServiceProvider::NoError) {
- setError(RouteError(serviceProvider->error() + NotSupportedError -1),
- serviceProvider->errorString());
+ QDeclarativeGeoRouteModel::RouteError newError = UnknownError;
+ switch (serviceProvider->error()) {
+ case QGeoServiceProvider::NotSupportedError:
+ newError = EngineNotSetError; break;
+ case QGeoServiceProvider::UnknownParameterError:
+ newError = UnknownParameterError; break;
+ case QGeoServiceProvider::MissingRequiredParameterError:
+ newError = MissingRequiredParameterError; break;
+ case QGeoServiceProvider::ConnectionError:
+ newError = CommunicationError; break;
+ default:
+ break;
+ }
+
+ setError(newError, serviceProvider->errorString());
return;
}
if (!routingManager) {
- setError(NotSupportedError, tr("Plugin does not support routing."));
+ setError(EngineNotSetError, tr("Plugin does not support routing."));
return;
}
@@ -519,12 +532,16 @@ QString QDeclarativeGeoRouteModel::errorString() const
This read-only property holds the latest error value of the routing request.
\list
- \li RouteModel.NoError - No error has occurred
- \li RouteModel.EngineNotSetError - The plugin/service provider used does not support routing
- \li RouteModel.CommunicationError - An error occurred while communicating with the service provider
- \li RouteModel.ParseError - The response from the service provider was in an unrecognizable format
- \li RouteModel.UnsupportedOptionError - The requested operation or one of the options for the operation are not supported by the service provider.
- \li RouteModel.UnknownError - An error occurred which does not fit into any of the other categories
+ \li RouteModel.NoError - No error has occurred.
+ \li RouteModel.CommunicationError - An error occurred while communicating with the service provider.
+ \li RouteModel.EngineNotSetError - The model's plugin property was not set or there is no routing manager associated with the plugin.
+ \li RouteModel.MissingRequiredParameterError - A required parameter was not specified.
+ \li RouteModel.ParseError - The response from the service provider was in an unrecognizable format.
+ \li RouteModel.UnknownError - An error occurred which does not fit into any of the other categories.
+ \li RouteModel.UnknownParameterError - The plugin did not recognize one of the parameters it was given.
+ \li RouteModel.UnsupportedOptionError - The requested operation is not supported by the routing provider.
+ This may happen when the loaded engine does not support a particular
+ type of routing request.
\endlist
*/
@@ -555,7 +572,7 @@ void QDeclarativeGeoRouteModel::update()
return;
if (!plugin_) {
- setError(NotSupportedError, tr("Cannot route, plugin not set."));
+ setError(EngineNotSetError, tr("Cannot route, plugin not set."));
return;
}
@@ -565,7 +582,7 @@ void QDeclarativeGeoRouteModel::update()
QGeoRoutingManager *routingManager = serviceProvider->routingManager();
if (!routingManager) {
- setError(NotSupportedError, tr("Cannot route, route manager not set."));
+ setError(EngineNotSetError, tr("Cannot route, route manager not set."));
return;
}
if (!routeQuery_) {
diff --git a/src/imports/location/qdeclarativegeoroutemodel_p.h b/src/imports/location/qdeclarativegeoroutemodel_p.h
index 363c3bc5..35cfe004 100644
--- a/src/imports/location/qdeclarativegeoroutemodel_p.h
+++ b/src/imports/location/qdeclarativegeoroutemodel_p.h
@@ -95,12 +95,11 @@ public:
ParseError = QGeoRouteReply::ParseError,
UnsupportedOptionError = QGeoRouteReply::UnsupportedOptionError,
UnknownError = QGeoRouteReply::UnknownError,
- //here we leave gap for future model errors
- //now geo service provider errors
- NotSupportedError = 100 + QGeoServiceProvider::NotSupportedError,
- UnknownParameterError = 100 + QGeoServiceProvider::UnknownParameterError,
- MissingRequiredParameterError = 100 + QGeoServiceProvider::MissingRequiredParameterError,
- ConnectionError = 100 + QGeoServiceProvider::ConnectionError
+ //we leave gap for future QGeoRouteReply errors
+
+ //QGeoServiceProvider related errors start here
+ UnknownParameterError = 100,
+ MissingRequiredParameterError
};
explicit QDeclarativeGeoRouteModel(QObject *parent = 0);
diff --git a/src/imports/location/qquickgeomapgesturearea.cpp b/src/imports/location/qquickgeomapgesturearea.cpp
index 8c4eadda..9ab11b97 100644
--- a/src/imports/location/qquickgeomapgesturearea.cpp
+++ b/src/imports/location/qquickgeomapgesturearea.cpp
@@ -144,7 +144,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype MapGestureArea
- \instantiates QDeclarativeGeoMapGestureArea
+ \instantiates QQuickGeoMapGestureArea
\inqmlmodule QtLocation
@@ -1180,8 +1180,6 @@ bool QQuickGeoMapGestureArea::tryStartFlick()
/*!
\internal
*/
-// FIXME:
-// - not left right / up down flicking, so if map is rotated, will act unintuitively
void QQuickGeoMapGestureArea::startFlick(int dx, int dy, int timeMs)
{
if (timeMs < 0)
diff --git a/src/imports/positioning/plugins.qmltypes b/src/imports/positioning/plugins.qmltypes
index 853c55cb..a47aa277 100644
--- a/src/imports/positioning/plugins.qmltypes
+++ b/src/imports/positioning/plugins.qmltypes
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.2
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable QtPositioning 5.5'
+// 'qmlplugindump -nonrelocatable QtPositioning 5.6'
Module {
dependencies: []
@@ -90,14 +90,6 @@ Module {
Property { name: "isTextGenerated"; type: "bool"; isReadonly: true }
}
Component {
- name: "QDeclarativeGeoCoordinateAnimation"
- prototype: "QQuickPropertyAnimation"
- exports: ["QtPositioning/CoordinateAnimation 5.3"]
- exportMetaObjectRevisions: [0]
- Property { name: "from"; type: "QGeoCoordinate" }
- Property { name: "to"; type: "QGeoCoordinate" }
- }
- Component {
name: "QDeclarativeGeoLocation"
prototype: "QObject"
exports: ["QtPositioning/Location 5.0"]
@@ -114,7 +106,7 @@ Module {
"QtPositioning/Position 5.0",
"QtPositioning/Position 5.3",
"QtPositioning/Position 5.4",
- "QtPositioning/Position 5.5"
+ "QtPositioning/Position 5.6"
]
exportMetaObjectRevisions: [0, 1, 2, 2]
Property { name: "latitudeValid"; type: "bool"; isReadonly: true }
@@ -251,6 +243,23 @@ Module {
Method { name: "complete" }
}
Component {
+ name: "QQuickGeoCoordinateAnimation"
+ prototype: "QQuickPropertyAnimation"
+ exports: ["QtPositioning/CoordinateAnimation 5.3"]
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "Direction"
+ values: {
+ "Shortest": 0,
+ "West": 1,
+ "East": 2
+ }
+ }
+ Property { name: "from"; type: "QGeoCoordinate" }
+ Property { name: "to"; type: "QGeoCoordinate" }
+ Property { name: "direction"; type: "Direction" }
+ }
+ Component {
name: "QQuickPropertyAnimation"
prototype: "QQuickAbstractAnimation"
Property { name: "duration"; type: "int" }