16 #ifndef QGSQUICKMAPCANVASMAP_H
17 #define QGSQUICKMAPCANVASMAP_H
19 #include "qgis_quick.h"
22 #include <QFutureSynchronizer>
24 #include <QtQuick/QQuickItem>
70 Q_PROPERTY(
bool freeze READ freeze WRITE setFreeze NOTIFY freezeChanged )
77 Q_PROPERTY(
bool isRendering READ isRendering NOTIFY isRenderingChanged )
84 Q_PROPERTY(
int mapUpdateInterval READ mapUpdateInterval WRITE setMapUpdateInterval NOTIFY mapUpdateIntervalChanged )
89 Q_PROPERTY(
bool incrementalRendering READ incrementalRendering WRITE setIncrementalRendering NOTIFY incrementalRenderingChanged )
96 QSGNode *updatePaintNode( QSGNode *oldNode, QQuickItem::UpdatePaintNodeData * ) override;
105 void setFreeze(
bool freeze );
108 bool isRendering() const;
111 int mapUpdateInterval() const;
114 void setMapUpdateInterval(
int mapUpdateInterval );
117 bool incrementalRendering() const;
120 void setIncrementalRendering(
bool incrementalRendering );
127 void renderStarting();
132 void mapCanvasRefreshed();
135 void freezeChanged();
138 void isRenderingChanged();
141 void mapUpdateIntervalChanged();
144 void incrementalRenderingChanged();
147 void geometryChanged( const QRectF &newGeometry, const QRectF &oldGeometry ) override;
151 void stopRendering();
156 void zoom( QPointF center, qreal scale );
161 void pan( QPointF oldPos, QPointF newPos );
176 void renderJobUpdated();
177 void renderJobFinished();
178 void layerRepaintRequested(
bool deferred );
179 void onWindowChanged( QQuickWindow *window );
180 void onScreenChanged( QScreen *screen );
181 void onExtentChanged();
182 void onLayersChanged();
191 void updateTransform();
192 void zoomToFullExtent();
195 bool mPinching = false;
196 QPoint mPinchStartPoint;
202 QTimer mRefreshTimer;
204 bool mFreeze = false;
205 QList<QMetaObject::Connection> mLayerConnections;
206 QTimer mMapUpdateTimer;
207 bool mIncrementalRendering = false;
208 bool mSilentRefresh = false;
209 bool mDeferredRefreshPending = false;
211 QQuickWindow *mWindow =
nullptr;
214 #endif // QGSQUICKMAPCANVASMAP_H