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#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 )
149 void geometryChanged(
const QRectF &newGeometry,
const QRectF &oldGeometry )
override;
151 void geometryChange(
const QRectF &newGeometry,
const QRectF &oldGeometry )
override;
161 void zoom( QPointF center, qreal scale );
166 void pan( QPointF oldPos, QPointF newPos );
181 void renderJobUpdated();
182 void renderJobFinished();
183 void layerRepaintRequested(
bool deferred );
184 void onWindowChanged( QQuickWindow *window );
185 void onScreenChanged( QScreen *screen );
186 void onExtentChanged();
187 void onLayersChanged();
188 void onTemporalStateChanged();
189 void onzRangeChanged();
192 enum class CacheInvalidationType
203 void updateTransform();
204 void zoomToFullExtent();
206 void clearTemporalCache();
207 void clearElevationCache();
208 QFlags<CacheInvalidationType> mCacheInvalidations;
210 std::unique_ptr<QgsQuickMapSettings> mMapSettings;
211 bool mPinching =
false;
212 QPoint mPinchStartPoint;
214 std::unique_ptr<QgsMapRendererCache> mCache;
218 QTimer mRefreshTimer;
220 bool mFreeze =
false;
221 QList<QMetaObject::Connection> mLayerConnections;
222 QTimer mMapUpdateTimer;
223 bool mIncrementalRendering =
false;
224 bool mSilentRefresh =
false;
225 bool mDeferredRefreshPending =
false;
227 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...