16#ifndef QGSQUICKMAPCANVASMAP_H
17#define QGSQUICKMAPCANVASMAP_H
21#include "qgis_quick.h"
26#include <QFutureSynchronizer>
28#include <QtQuick/QQuickItem>
97 QSGNode *
updatePaintNode( QSGNode *oldNode, QQuickItem::UpdatePaintNodeData * ) override;
148 void geometryChange( const QRectF &newGeometry, const QRectF &oldGeometry ) override;
157 void zoom( QPointF center, qreal scale );
162 void pan( QPointF oldPos, QPointF newPos );
177 void renderJobUpdated();
178 void renderJobFinished();
179 void layerRepaintRequested(
bool deferred );
180 void onWindowChanged( QQuickWindow *window );
181 void onScreenChanged( QScreen *screen );
182 void onExtentChanged();
183 void onLayersChanged();
184 void onTemporalStateChanged();
185 void onzRangeChanged();
188 enum class CacheInvalidationType
199 void updateTransform();
200 void zoomToFullExtent();
202 void clearTemporalCache();
203 void clearElevationCache();
204 QFlags<CacheInvalidationType> mCacheInvalidations;
206 std::unique_ptr<QgsQuickMapSettings> mMapSettings;
207 bool mPinching =
false;
208 QPoint mPinchStartPoint;
210 std::unique_ptr<QgsMapRendererCache> mCache;
214 QTimer mRefreshTimer;
216 bool mFreeze =
false;
217 QList<QMetaObject::Connection> mLayerConnections;
218 QTimer mMapUpdateTimer;
219 bool mIncrementalRendering =
false;
220 bool mSilentRefresh =
false;
221 bool mDeferredRefreshPending =
false;
223 QQuickWindow *mWindow =
nullptr;
Stores computed placement from labeling engine.
Responsible for keeping a cache of rendered images resulting from a map rendering job.
Abstract base class for map rendering implementations.
Job implementation that renders all layers in parallel.
Contains configuration for rendering maps.
void freezeChanged()
When freeze property is set to true, the map canvas does not refresh.
bool isRendering
The isRendering property is set to true while a rendering job is pending for this map canvas map.
void mapCanvasRefreshed()
Signal is emitted when a canvas is refreshed.
void incrementalRenderingChanged()
When the incrementalRendering property is set to true, the automatic refresh of map canvas during ren...
int mapUpdateInterval
Interval in milliseconds after which the map canvas will be updated while a rendering job is ongoing.
void setMapUpdateInterval(int mapUpdateInterval)
Interval in milliseconds after which the map canvas will be updated while a rendering job is ongoing.
void pan(QPointF oldPos, QPointF newPos)
Set map setting's extent (pan the map) based on the difference of positions.
void renderStarting()
Signal is emitted when a rendering is starting.
void stopRendering()
Stop map rendering.
void zoom(QPointF center, qreal scale)
Set map setting's extent (zoom the map) on the center by given scale.
void setIncrementalRendering(bool incrementalRendering)
When the incrementalRendering property is set to true, the automatic refresh of map canvas during ren...
void clearCache()
Clears rendering cache.
void setFreeze(bool freeze)
When freeze property is set to true, the map canvas does not refresh.
QgsQuickMapSettings * mapSettings
The mapSettings property contains configuration for rendering of the map.
void refresh()
Refresh the map canvas.
QSGNode * updatePaintNode(QSGNode *oldNode, QQuickItem::UpdatePaintNodeData *) override
void mapUpdateIntervalChanged()
Interval in milliseconds after which the map canvas will be updated while a rendering job is ongoing.
bool incrementalRendering
When the incrementalRendering property is set to true, the automatic refresh of map canvas during ren...
bool freeze
When freeze property is set to true, the map canvas does not refresh.
void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override
QgsQuickMapCanvasMap(QQuickItem *parent=nullptr)
Create map canvas map.
void isRenderingChanged()
The isRendering property is set to true while a rendering job is pending for this map canvas map.
Encapsulates QgsMapSettings class to offer settings of configuration of map rendering via QML propert...