This class implements a visual Qt Quick Item that does map rendering according to the current map settings.
More...
#include <qgsquickmapcanvasmap.h>
|
void | clearCache () |
| Clears rendering cache. More...
|
|
void | pan (QPointF oldPos, QPointF newPos) |
| Set map setting's extent (pan the map) based on the difference of positions. More...
|
|
void | refresh () |
| Refresh the map canvas. More...
|
|
void | stopRendering () |
| Stop map rendering. More...
|
|
void | zoom (QPointF center, qreal scale) |
| Set map setting's extent (zoom the map) on the center by given scale. More...
|
|
|
void | geometryChange (const QRectF &newGeometry, const QRectF &oldGeometry) override |
|
|
bool | freeze |
| When freeze property is set to true , the map canvas does not refresh. More...
|
|
bool | incrementalRendering |
| When the incrementalRendering property is set to true , the automatic refresh of map canvas during rendering is allowed. More...
|
|
bool | isRendering |
| The isRendering property is set to true while a rendering job is pending for this map canvas map. More...
|
|
QgsQuickMapSettings * | mapSettings |
| The mapSettings property contains configuration for rendering of the map. More...
|
|
int | mapUpdateInterval |
| Interval in milliseconds after which the map canvas will be updated while a rendering job is ongoing. More...
|
|
This class implements a visual Qt Quick Item that does map rendering according to the current map settings.
Client code is expected to use MapCanvas item rather than using this class directly.
QgsQuickMapCanvasMap instance internally creates QgsQuickMapSettings in constructor. The QgsProject should be attached to the QgsQuickMapSettings. The map settings for other QgsQuick components should be initialized from QgsQuickMapCanvasMap's mapSettings
- Note
- QML Type: MapCanvasMap
- See also
- QgsQuickMapCanvas
- Since
- QGIS 3.2
Definition at line 52 of file qgsquickmapcanvasmap.h.
◆ QgsQuickMapCanvasMap()
QgsQuickMapCanvasMap::QgsQuickMapCanvasMap |
( |
QQuickItem * |
parent = nullptr | ) |
|
|
explicit |
◆ ~QgsQuickMapCanvasMap()
QgsQuickMapCanvasMap::~QgsQuickMapCanvasMap |
( |
| ) |
|
|
default |
◆ clearCache
void QgsQuickMapCanvasMap::clearCache |
( |
| ) |
|
|
slot |
◆ freeze()
bool QgsQuickMapCanvasMap::freeze |
( |
| ) |
const |
When freeze property is set to true
, the map canvas does not refresh.
The value temporary changes during the rendering process.
Definition at line 329 of file qgsquickmapcanvasmap.cpp.
◆ freezeChanged
void QgsQuickMapCanvasMap::freezeChanged |
( |
| ) |
|
|
signal |
When freeze property is set to true
, the map canvas does not refresh.
The value temporary changes during the rendering process.
◆ geometryChange()
void QgsQuickMapCanvasMap::geometryChange |
( |
const QRectF & |
newGeometry, |
|
|
const QRectF & |
oldGeometry |
|
) |
| |
|
overrideprotected |
◆ incrementalRendering()
bool QgsQuickMapCanvasMap::incrementalRendering |
( |
| ) |
const |
When the incrementalRendering property is set to true
, the automatic refresh of map canvas during rendering is allowed.
Definition at line 315 of file qgsquickmapcanvasmap.cpp.
◆ incrementalRenderingChanged
void QgsQuickMapCanvasMap::incrementalRenderingChanged |
( |
| ) |
|
|
signal |
When the incrementalRendering property is set to true
, the automatic refresh of map canvas during rendering is allowed.
◆ isRendering()
bool QgsQuickMapCanvasMap::isRendering |
( |
| ) |
const |
The isRendering property is set to true
while a rendering job is pending for this map canvas map.
It can be used to show a notification icon about an ongoing rendering job. This is a readonly property.
Definition at line 349 of file qgsquickmapcanvasmap.cpp.
◆ isRenderingChanged
void QgsQuickMapCanvasMap::isRenderingChanged |
( |
| ) |
|
|
signal |
The isRendering property is set to true
while a rendering job is pending for this map canvas map.
It can be used to show a notification icon about an ongoing rendering job. This is a readonly property.
◆ mapCanvasRefreshed
void QgsQuickMapCanvasMap::mapCanvasRefreshed |
( |
| ) |
|
|
signal |
Signal is emitted when a canvas is refreshed.
◆ mapSettings()
The mapSettings property contains configuration for rendering of the map.
It should be used as a primary source of map settings (and project) for all other components in the application.
This is a readonly property.
Definition at line 61 of file qgsquickmapcanvasmap.cpp.
◆ mapUpdateInterval()
int QgsQuickMapCanvasMap::mapUpdateInterval |
( |
| ) |
const |
Interval in milliseconds after which the map canvas will be updated while a rendering job is ongoing.
This only has an effect if incrementalRendering is activated. Default is 250 [ms].
Definition at line 300 of file qgsquickmapcanvasmap.cpp.
◆ mapUpdateIntervalChanged
void QgsQuickMapCanvasMap::mapUpdateIntervalChanged |
( |
| ) |
|
|
signal |
Interval in milliseconds after which the map canvas will be updated while a rendering job is ongoing.
This only has an effect if incrementalRendering is activated. Default is 250 [ms].
◆ pan
void QgsQuickMapCanvasMap::pan |
( |
QPointF |
oldPos, |
|
|
QPointF |
newPos |
|
) |
| |
|
slot |
Set map setting's extent (pan the map) based on the difference of positions.
Definition at line 80 of file qgsquickmapcanvasmap.cpp.
◆ refresh
void QgsQuickMapCanvasMap::refresh |
( |
| ) |
|
|
slot |
Refresh the map canvas.
Does nothing when output size of map settings is not set
Definition at line 477 of file qgsquickmapcanvasmap.cpp.
◆ renderStarting
void QgsQuickMapCanvasMap::renderStarting |
( |
| ) |
|
|
signal |
Signal is emitted when a rendering is starting.
◆ setFreeze()
void QgsQuickMapCanvasMap::setFreeze |
( |
bool |
freeze | ) |
|
When freeze property is set to true
, the map canvas does not refresh.
The value temporary changes during the rendering process.
Definition at line 334 of file qgsquickmapcanvasmap.cpp.
◆ setIncrementalRendering()
void QgsQuickMapCanvasMap::setIncrementalRendering |
( |
bool |
incrementalRendering | ) |
|
When the incrementalRendering property is set to true
, the automatic refresh of map canvas during rendering is allowed.
Definition at line 320 of file qgsquickmapcanvasmap.cpp.
◆ setMapUpdateInterval()
void QgsQuickMapCanvasMap::setMapUpdateInterval |
( |
int |
mapUpdateInterval | ) |
|
Interval in milliseconds after which the map canvas will be updated while a rendering job is ongoing.
This only has an effect if incrementalRendering is activated. Default is 250 [ms].
Definition at line 305 of file qgsquickmapcanvasmap.cpp.
◆ stopRendering
void QgsQuickMapCanvasMap::stopRendering |
( |
| ) |
|
|
slot |
◆ updatePaintNode()
QSGNode * QgsQuickMapCanvasMap::updatePaintNode |
( |
QSGNode * |
oldNode, |
|
|
QQuickItem::UpdatePaintNodeData * |
|
|
) |
| |
|
override |
◆ zoom
void QgsQuickMapCanvasMap::zoom |
( |
QPointF |
center, |
|
|
qreal |
scale |
|
) |
| |
|
slot |
◆ freeze
bool QgsQuickMapCanvasMap::freeze |
|
readwrite |
When freeze property is set to true
, the map canvas does not refresh.
The value temporary changes during the rendering process.
Definition at line 52 of file qgsquickmapcanvasmap.h.
◆ incrementalRendering
bool QgsQuickMapCanvasMap::incrementalRendering |
|
readwrite |
When the incrementalRendering property is set to true
, the automatic refresh of map canvas during rendering is allowed.
Definition at line 52 of file qgsquickmapcanvasmap.h.
◆ isRendering
bool QgsQuickMapCanvasMap::isRendering |
|
read |
The isRendering property is set to true
while a rendering job is pending for this map canvas map.
It can be used to show a notification icon about an ongoing rendering job. This is a readonly property.
Definition at line 52 of file qgsquickmapcanvasmap.h.
◆ mapSettings
The mapSettings property contains configuration for rendering of the map.
It should be used as a primary source of map settings (and project) for all other components in the application.
This is a readonly property.
Definition at line 52 of file qgsquickmapcanvasmap.h.
◆ mapUpdateInterval
int QgsQuickMapCanvasMap::mapUpdateInterval |
|
readwrite |
Interval in milliseconds after which the map canvas will be updated while a rendering job is ongoing.
This only has an effect if incrementalRendering is activated. Default is 250 [ms].
Definition at line 52 of file qgsquickmapcanvasmap.h.
The documentation for this class was generated from the following files: