diff options
Diffstat (limited to 'src/imports/location/qdeclarativegeomap_p.h')
-rw-r--r-- | src/imports/location/qdeclarativegeomap_p.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/imports/location/qdeclarativegeomap_p.h b/src/imports/location/qdeclarativegeomap_p.h index a36f2991..93f9426b 100644 --- a/src/imports/location/qdeclarativegeomap_p.h +++ b/src/imports/location/qdeclarativegeomap_p.h @@ -44,10 +44,7 @@ #include <QtQuick/QQuickItem> #include <QtCore/QPointer> #include <QtCore/QMutex> - - - - +#include <QtPositioning/qgeoshape.h> QT_BEGIN_NAMESPACE @@ -70,6 +67,7 @@ class QDeclarativeGeoMap : public QQuickItem Q_PROPERTY(QList<QObject *> mapItems READ mapItems NOTIFY mapItemsChanged) Q_PROPERTY(QGeoServiceProvider::Error error READ error NOTIFY errorChanged) Q_PROPERTY(QString errorString READ errorString NOTIFY errorChanged) + Q_PROPERTY(QGeoShape visibleRegion READ visibleRegion WRITE setVisibleRegion) Q_INTERFACES(QQmlParserStatus) public: @@ -95,6 +93,9 @@ public: void setCenter(const QGeoCoordinate ¢er); QGeoCoordinate center() const; + void setVisibleRegion(const QGeoShape &shape); + QGeoShape visibleRegion() const; + QQmlListProperty<QDeclarativeGeoMapType> supportedMapTypes(); Q_INVOKABLE void removeMapItem(QDeclarativeGeoMapItemBase *item); @@ -161,6 +162,7 @@ private: void setupMapView(QDeclarativeGeoMapItemView *view); void populateMap(); void fitViewportToMapItemsRefine(bool refine); + void fitViewportToGeoShape(); bool isInteractive(); private: @@ -181,6 +183,8 @@ private: qreal m_zoomLevel; bool m_componentCompleted; bool m_mappingManagerInitialized; + QGeoShape m_region; + bool m_pendingFitViewport; friend class QDeclarativeGeoMapItem; friend class QDeclarativeGeoMapItemView; |