summaryrefslogtreecommitdiff
path: root/src/location/maps/qgeomappingmanagerengine.cpp
diff options
context:
space:
mode:
authorjuhvu <qt-info@nokia.com>2011-10-20 11:24:34 +1000
committerQt by Nokia <qt-info@nokia.com>2011-10-20 07:08:21 +0200
commit0acb68f58dc276faea85c74311fee3920a99eac6 (patch)
tree43843899bad652d583eff61ec58438a4c6d5abfc /src/location/maps/qgeomappingmanagerengine.cpp
parent8f765817b02e72356a0a4461b2889344fdc83dea (diff)
downloadqtlocation-0acb68f58dc276faea85c74311fee3920a99eac6.tar.gz
QML Map pinch and flick part 1/3
Autotest fw changes. First autotests and related fixes. Map initialization order changed to avoid blinking in hardcoded geocoordinate during app startup. Change-Id: Iaad879c135b6283957e0705b991474517f933485 Reviewed-by: David Laing <david.laing@nokia.com>
Diffstat (limited to 'src/location/maps/qgeomappingmanagerengine.cpp')
-rw-r--r--src/location/maps/qgeomappingmanagerengine.cpp40
1 files changed, 38 insertions, 2 deletions
diff --git a/src/location/maps/qgeomappingmanagerengine.cpp b/src/location/maps/qgeomappingmanagerengine.cpp
index b70cd5a8..242c2e02 100644
--- a/src/location/maps/qgeomappingmanagerengine.cpp
+++ b/src/location/maps/qgeomappingmanagerengine.cpp
@@ -79,6 +79,7 @@ QGeoMappingManagerEngine::QGeoMappingManagerEngine(const QMap<QString, QVariant>
d_ptr(new QGeoMappingManagerEnginePrivate())
{
d_ptr->parameters = parameters;
+ d_ptr->initialized = false;
}
/*!
@@ -103,8 +104,21 @@ QMap<QString, QVariant> QGeoMappingManagerEngine::parameters() const
return d->parameters;
}
+/*!
+ Initializes the engine. Subclasses of QGeoMappingManagerEngine may
+ implement this function to perform (potentially asynchronous) initialization.
+
+ Static/already known data (such as min/max zoom levels) is better to
+ initialize already earlier (e.g. in constructor).
+
+ Once subclasses are done with initialization, they should call this baseclass
+ implementation of init().
+*/
void QGeoMappingManagerEngine::init()
{
+ Q_D(QGeoMappingManagerEngine);
+ d->initialized = true;
+ emit initialized();
}
void QGeoMappingManagerEngine::threadStarted()
@@ -344,6 +358,17 @@ QSize QGeoMappingManagerEngine::tileSize() const
return d->tileSize;
}
+
+/*!
+ Return whether the engine has been initialized and is ready to be used.
+*/
+
+bool QGeoMappingManagerEngine::isInitialized() const
+{
+ Q_D(const QGeoMappingManagerEngine);
+ return d->initialized;
+}
+
/*!
Sets the minimum zoom level supported by this engine to \a minimumZoom.
@@ -360,6 +385,17 @@ void QGeoMappingManagerEngine::setMinimumZoomLevel(qreal minimumZoom)
}
/*!
+ \fn void QGeoMappingManagerEngine::initialized()
+
+ This signal is emitted when the mapping manager has been initialized
+ and is ready to be used.
+
+ Subclasses of QGeoMappingManagerEngine should call the
+ QGeoMappingManagerEngine init() when they have initialized themselves.
+*/
+
+
+/*!
Sets the maximum zoom level supported by this engine to \a maximumZoom.
Larger values of the zoom level correspond to more detailed views of the
@@ -503,8 +539,8 @@ QLocale QGeoMappingManagerEngine::locale() const
QGeoMappingManagerEnginePrivate::QGeoMappingManagerEnginePrivate()
: managerVersion(-1),
- minimumZoomLevel(1.0),
- maximumZoomLevel(20.0), // todo fixme, this needs to come from plugin
+ minimumZoomLevel(-2.0),
+ maximumZoomLevel(-2.0), // todo fixme, this needs to come from plugin
supportsBearing(false),
supportsTilting(false),
minimumTilt(0.0),