diff options
author | Paolo Angelelli <paolo.angelelli@qt.io> | 2017-02-24 00:01:08 +0100 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@qt.io> | 2017-03-08 10:00:49 +0000 |
commit | 919c4415d0dc06177d8f3c2a300549d62a8dcdd4 (patch) | |
tree | 4dae16cee274abc4910474f8a8c4be0fda09a0bc /src/location/declarativemaps/qdeclarativegeomapquickitem_p.h | |
parent | 34c474703f6761a2dafecb219da51c66ebd4709a (diff) | |
download | qtlocation-919c4415d0dc06177d8f3c2a300549d62a8dcdd4.tar.gz |
Fix MapQuickItem when zoomLevel is set
This patch fixes the behavior of MapQuickItem when the zoomLevel is
set, that is it makes behave the qquickitem as if it would be
on the map, instead of on the screen.
Change-Id: Ibb8a6000e2f6a37a68c32df001fc8565079a6f70
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/location/declarativemaps/qdeclarativegeomapquickitem_p.h')
-rw-r--r-- | src/location/declarativemaps/qdeclarativegeomapquickitem_p.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/location/declarativemaps/qdeclarativegeomapquickitem_p.h b/src/location/declarativemaps/qdeclarativegeomapquickitem_p.h index 23de8861..cce94d85 100644 --- a/src/location/declarativemaps/qdeclarativegeomapquickitem_p.h +++ b/src/location/declarativemaps/qdeclarativegeomapquickitem_p.h @@ -59,6 +59,17 @@ QT_BEGIN_NAMESPACE +class QMapQuickItemMatrix4x4 : public QQuickTransform +{ +public: + QMapQuickItemMatrix4x4(QObject *parent = nullptr); + + void setMatrix(const QMatrix4x4& matrix); + void applyTo(QMatrix4x4 *matrix) const Q_DECL_OVERRIDE; + + QMatrix4x4 m_matrix; +}; + class Q_LOCATION_PRIVATE_EXPORT QDeclarativeGeoMapQuickItem : public QDeclarativeGeoMapItemBase { Q_OBJECT @@ -112,6 +123,7 @@ private: qreal zoomLevel_; bool mapAndSourceItemSet_; bool updatingGeometry_; + QMapQuickItemMatrix4x4 *matrix_; }; QT_END_NAMESPACE |