QGIS API Documentation 3.41.0-Master (fda2aa46e9a)
|
This class implements a visual Qt Quick Item that does map rendering according to the current map settings. More...
#include <qgsquickmapcanvasmap.h>
Public Slots | |
void | clearCache () |
Clears rendering cache. | |
void | pan (QPointF oldPos, QPointF newPos) |
Set map setting's extent (pan the map) based on the difference of positions. | |
void | refresh () |
Refresh the map canvas. | |
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. | |
Signals | |
void | freezeChanged () |
When freeze property is set to true , the map canvas does not refresh. | |
void | incrementalRenderingChanged () |
When the incrementalRendering property is set to true , the automatic refresh of map canvas during rendering is allowed. | |
void | isRenderingChanged () |
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 | mapUpdateIntervalChanged () |
Interval in milliseconds after which the map canvas will be updated while a rendering job is ongoing. | |
void | renderStarting () |
Signal is emitted when a rendering is starting. | |
Public Member Functions | |
QgsQuickMapCanvasMap (QQuickItem *parent=nullptr) | |
Create map canvas map. | |
~QgsQuickMapCanvasMap () | |
bool | freeze () const |
When freeze property is set to true , the map canvas does not refresh. | |
bool | incrementalRendering () const |
When the incrementalRendering property is set to true , the automatic refresh of map canvas during rendering is allowed. | |
bool | isRendering () const |
The isRendering property is set to true while a rendering job is pending for this map canvas map. | |
QgsQuickMapSettings * | mapSettings () const |
The mapSettings property contains configuration for rendering of the map. | |
int | mapUpdateInterval () const |
Interval in milliseconds after which the map canvas will be updated while a rendering job is ongoing. | |
void | setFreeze (bool freeze) |
When freeze property is set to true , the map canvas does not refresh. | |
void | setIncrementalRendering (bool incrementalRendering) |
When the incrementalRendering property is set to true , the automatic refresh of map canvas during rendering is allowed. | |
void | setMapUpdateInterval (int mapUpdateInterval) |
Interval in milliseconds after which the map canvas will be updated while a rendering job is ongoing. | |
QSGNode * | updatePaintNode (QSGNode *oldNode, QQuickItem::UpdatePaintNodeData *) override |
Protected Member Functions | |
void | geometryChange (const QRectF &newGeometry, const QRectF &oldGeometry) override |
Properties | |
bool | freeze |
When freeze property is set to true , the map canvas does not refresh. | |
bool | incrementalRendering |
When the incrementalRendering property is set to true , the automatic refresh of map canvas during rendering is allowed. | |
bool | isRendering |
The isRendering property is set to true while a rendering job is pending for this map canvas map. | |
QgsQuickMapSettings * | mapSettings |
The mapSettings property contains configuration for rendering of the map. | |
int | mapUpdateInterval |
Interval in milliseconds after which the map canvas will be updated while a rendering job is ongoing. | |
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
Definition at line 52 of file qgsquickmapcanvasmap.h.
|
explicit |
Create map canvas map.
Definition at line 40 of file qgsquickmapcanvasmap.cpp.
|
default |
|
slot |
Clears rendering cache.
Definition at line 515 of file qgsquickmapcanvasmap.cpp.
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 353 of file qgsquickmapcanvasmap.cpp.
|
signal |
When freeze property is set to true
, the map canvas does not refresh.
The value temporary changes during the rendering process.
|
overrideprotected |
Definition at line 429 of file qgsquickmapcanvasmap.cpp.
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 339 of file qgsquickmapcanvasmap.cpp.
|
signal |
When the incrementalRendering property is set to true
, the automatic refresh of map canvas during rendering is allowed.
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 373 of file qgsquickmapcanvasmap.cpp.
|
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.
|
signal |
Signal is emitted when a canvas is refreshed.
QgsQuickMapSettings * QgsQuickMapCanvasMap::mapSettings | ( | ) | const |
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 66 of file qgsquickmapcanvasmap.cpp.
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 324 of file qgsquickmapcanvasmap.cpp.
|
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].
|
slot |
Set map setting's extent (pan the map) based on the difference of positions.
Definition at line 85 of file qgsquickmapcanvasmap.cpp.
|
slot |
Refresh the map canvas.
Does nothing when output size of map settings is not set
Definition at line 506 of file qgsquickmapcanvasmap.cpp.
|
signal |
Signal is emitted when a rendering is starting.
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 358 of file qgsquickmapcanvasmap.cpp.
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 344 of file qgsquickmapcanvasmap.cpp.
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 329 of file qgsquickmapcanvasmap.cpp.
|
slot |
Stop map rendering.
Definition at line 466 of file qgsquickmapcanvasmap.cpp.
|
override |
Definition at line 378 of file qgsquickmapcanvasmap.cpp.
|
slot |
Set map setting's extent (zoom the map) on the center by given scale.
Definition at line 71 of file qgsquickmapcanvasmap.cpp.
|
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 70 of file qgsquickmapcanvasmap.h.
|
readwrite |
When the incrementalRendering property is set to true
, the automatic refresh of map canvas during rendering is allowed.
Definition at line 89 of file qgsquickmapcanvasmap.h.
|
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 77 of file qgsquickmapcanvasmap.h.
|
read |
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 64 of file qgsquickmapcanvasmap.h.
|
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 84 of file qgsquickmapcanvasmap.h.