diff options
author | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2017-03-03 12:58:09 -0800 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@qt.io> | 2017-03-03 21:18:00 +0000 |
commit | 6447ad0b5d1beaefac767019591f1d6fea97d3fd (patch) | |
tree | 1fca4830b962d5270cff243340fd15cb2c167d2c | |
parent | 32ffdfbb4ed93df0e4b71a1ed0831813ddd51fe4 (diff) | |
download | qtlocation-6447ad0b5d1beaefac767019591f1d6fea97d3fd.tar.gz |
Notify when the map is initialized
This patch makes the map notify when the initialization is
complete, and thus all the API functioning as expected, like
fromCoordinate and toCoordinate.
Change-Id: Idaebbcf910f32dd297bd5ebec6dffa166d015b4a
Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
-rw-r--r-- | src/location/declarativemaps/qdeclarativegeomap.cpp | 8 | ||||
-rw-r--r-- | src/location/declarativemaps/qdeclarativegeomap_p.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/location/declarativemaps/qdeclarativegeomap.cpp b/src/location/declarativemaps/qdeclarativegeomap.cpp index a509a98a..604b0c46 100644 --- a/src/location/declarativemaps/qdeclarativegeomap.cpp +++ b/src/location/declarativemaps/qdeclarativegeomap.cpp @@ -159,6 +159,12 @@ QT_BEGIN_NAMESPACE application should open the link in a browser or display its contents to the user. */ +/*! + \qmlsignal QtLocation::Map::initialized() + + This signal is emitted when the initialization of the map is complete. +*/ + QDeclarativeGeoMap::QDeclarativeGeoMap(QQuickItem *parent) : QQuickItem(parent), m_plugin(0), @@ -417,6 +423,8 @@ void QDeclarativeGeoMap::initialize() if (fovHasChanged) emit fieldOfViewChanged(m_cameraData.fieldOfView()); + + emit initialized(); } /*! diff --git a/src/location/declarativemaps/qdeclarativegeomap_p.h b/src/location/declarativemaps/qdeclarativegeomap_p.h index c3d798f2..ab5732e4 100644 --- a/src/location/declarativemaps/qdeclarativegeomap_p.h +++ b/src/location/declarativemaps/qdeclarativegeomap_p.h @@ -202,6 +202,7 @@ Q_SIGNALS: void maximumFieldOfViewChanged(qreal maximumFieldOfView); void copyrightsChanged(const QImage ©rightsImage); void copyrightsChanged(const QString ©rightsHtml); + void initialized(); protected: void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE ; |