QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
|
This class implements a visual Qt Quick Item that does elevation profile rendering according to the current project settings and a profile curve geometry. More...
#include <qgsquickelevationprofilecanvas.h>
Public Slots | |
Q_INVOKABLE void | clear () |
Clears the current profile. | |
Q_INVOKABLE void | zoomFull () |
Zooms to the full extent of the profile. | |
Q_INVOKABLE void | zoomFullInRatio () |
Zooms to the full extent of the profile while maintaining X and Y axes' length ratio. | |
Signals | |
void | activeJobCountChanged (int count) |
Emitted when the number of active background jobs changes. | |
void | crsChanged () |
Emitted when the CRS linked to the profile curve geometry changes. | |
void | isRenderingChanged () |
The isRendering property is set to true while a rendering job is pending for this elevation profile canvas. | |
void | profileCurveChanged () |
Emitted when the profile curve geometry changes. | |
void | projectChanged () |
Emitted when the associated project changes. | |
void | toleranceChanged () |
Emitted when the tolerance changes. | |
Public Member Functions | |
QgsQuickElevationProfileCanvas (QQuickItem *parent=nullptr) | |
Constructor for QgsElevationProfileCanvas, with the specified parent widget. | |
~QgsQuickElevationProfileCanvas () | |
void | cancelJobs () |
Cancel any rendering job in a blocking way. | |
QgsCoordinateReferenceSystem | crs () const |
Returns the crs associated with map coordinates. | |
bool | isRendering () const |
The isRendering property is set to true while a rendering job is pending for this elevation profile canvas. | |
QList< QgsMapLayer * > | layers () const |
Returns the list of layers included in the profile. | |
Q_INVOKABLE void | populateLayersFromProject () |
Populates the current profile with elevation-enabled layers from the associated project. | |
QgsGeometry | profileCurve () const |
Returns the profile curve geometry. | |
QgsProject * | project () const |
Returns the project associated with the profile. | |
Q_INVOKABLE void | refresh () |
Triggers a complete regeneration of the profile, causing the profile extraction to perform in the background. | |
void | setCrs (const QgsCoordinateReferenceSystem &crs) |
Sets the crs associated with the map coordinates. | |
void | setProfileCurve (QgsGeometry curve) |
Sets the profile curve geometry. | |
void | setProject (QgsProject *project) |
Sets the project associated with the profile. | |
void | setTolerance (double tolerance) |
Sets the profile tolerance (in crs() units). | |
void | setVisiblePlotRange (double minimumDistance, double maximumDistance, double minimumElevation, double maximumElevation) |
Sets the visible area of the plot. | |
double | tolerance () const |
Returns the tolerance of the profile (in crs() units). | |
QSGNode * | updatePaintNode (QSGNode *oldNode, QQuickItem::UpdatePaintNodeData *) override |
QgsDoubleRange | visibleDistanceRange () const |
Returns the distance range currently visible in the plot. | |
QgsDoubleRange | visibleElevationRange () const |
Returns the elevation range currently visible in the plot. | |
Protected Member Functions | |
void | geometryChange (const QRectF &newGeometry, const QRectF &oldGeometry) override |
Properties | |
QgsCoordinateReferenceSystem | crs |
bool | isRendering |
The isRendering property is set to true while a rendering job is pending for this elevation profile canvas. | |
QgsGeometry | profileCurve |
QgsProject * | project |
double | tolerance |
This class implements a visual Qt Quick Item that does elevation profile rendering according to the current project settings and a profile curve geometry.
Definition at line 40 of file qgsquickelevationprofilecanvas.h.
|
explicit |
Constructor for QgsElevationProfileCanvas, with the specified parent widget.
Definition at line 143 of file qgsquickelevationprofilecanvas.cpp.
QgsQuickElevationProfileCanvas::~QgsQuickElevationProfileCanvas | ( | ) |
Definition at line 163 of file qgsquickelevationprofilecanvas.cpp.
|
signal |
Emitted when the number of active background jobs changes.
void QgsQuickElevationProfileCanvas::cancelJobs | ( | ) |
Cancel any rendering job in a blocking way.
Definition at line 173 of file qgsquickelevationprofilecanvas.cpp.
|
slot |
Clears the current profile.
Definition at line 726 of file qgsquickelevationprofilecanvas.cpp.
|
inline |
Returns the crs associated with map coordinates.
Definition at line 112 of file qgsquickelevationprofilecanvas.h.
|
signal |
Emitted when the CRS linked to the profile curve geometry changes.
|
overrideprotected |
Definition at line 554 of file qgsquickelevationprofilecanvas.cpp.
bool QgsQuickElevationProfileCanvas::isRendering | ( | ) | const |
The isRendering property is set to true while a rendering job is pending for this elevation profile canvas.
It can be used to show a notification icon about an ongoing rendering job. This is a readonly property.
Definition at line 236 of file qgsquickelevationprofilecanvas.cpp.
|
signal |
The isRendering property is set to true while a rendering job is pending for this elevation profile canvas.
It can be used to show a notification icon about an ongoing rendering job. This is a readonly property.
QList< QgsMapLayer * > QgsQuickElevationProfileCanvas::layers | ( | ) | const |
Returns the list of layers included in the profile.
Definition at line 544 of file qgsquickelevationprofilecanvas.cpp.
void QgsQuickElevationProfileCanvas::populateLayersFromProject | ( | ) |
Populates the current profile with elevation-enabled layers from the associated project.
Definition at line 503 of file qgsquickelevationprofilecanvas.cpp.
|
inline |
Returns the profile curve geometry.
The CRS associated with the curve is retrieved via crs().
Definition at line 137 of file qgsquickelevationprofilecanvas.h.
|
signal |
Emitted when the profile curve geometry changes.
|
inline |
Returns the project associated with the profile.
Definition at line 87 of file qgsquickelevationprofilecanvas.h.
|
signal |
Emitted when the associated project changes.
void QgsQuickElevationProfileCanvas::refresh | ( | ) |
Triggers a complete regeneration of the profile, causing the profile extraction to perform in the background.
Definition at line 241 of file qgsquickelevationprofilecanvas.cpp.
void QgsQuickElevationProfileCanvas::setCrs | ( | const QgsCoordinateReferenceSystem & | crs | ) |
Sets the crs associated with the map coordinates.
Definition at line 473 of file qgsquickelevationprofilecanvas.cpp.
void QgsQuickElevationProfileCanvas::setProfileCurve | ( | QgsGeometry | curve | ) |
Sets the profile curve geometry.
The CRS associated with curve is set via setCrs().
Definition at line 483 of file qgsquickelevationprofilecanvas.cpp.
void QgsQuickElevationProfileCanvas::setProject | ( | QgsProject * | project | ) |
Sets the project associated with the profile.
This must be set before any layers which utilize terrain based elevation settings can be included in the canvas.
Definition at line 463 of file qgsquickelevationprofilecanvas.cpp.
void QgsQuickElevationProfileCanvas::setTolerance | ( | double | tolerance | ) |
Sets the profile tolerance (in crs() units).
This value determines how far from the profileCurve() is appropriate for inclusion of results. For instance, when a profile is generated for a point vector layer this tolerance distance will dictate how far from the actual profile curve a point can reside within to be included in the results.
Definition at line 493 of file qgsquickelevationprofilecanvas.cpp.
void QgsQuickElevationProfileCanvas::setVisiblePlotRange | ( | double | minimumDistance, |
double | maximumDistance, | ||
double | minimumElevation, | ||
double | maximumElevation | ||
) |
Sets the visible area of the plot.
Definition at line 707 of file qgsquickelevationprofilecanvas.cpp.
|
inline |
Returns the tolerance of the profile (in crs() units).
This value determines how far from the profileCurve() is appropriate for inclusion of results. For instance, when a profile is generated for a point vector layer this tolerance distance will dictate how far from the actual profile curve a point can reside within to be included in the results.
Definition at line 159 of file qgsquickelevationprofilecanvas.h.
|
signal |
Emitted when the tolerance changes.
|
override |
Definition at line 563 of file qgsquickelevationprofilecanvas.cpp.
QgsDoubleRange QgsQuickElevationProfileCanvas::visibleDistanceRange | ( | ) | const |
Returns the distance range currently visible in the plot.
Definition at line 716 of file qgsquickelevationprofilecanvas.cpp.
QgsDoubleRange QgsQuickElevationProfileCanvas::visibleElevationRange | ( | ) | const |
Returns the elevation range currently visible in the plot.
Definition at line 721 of file qgsquickelevationprofilecanvas.cpp.
|
slot |
Zooms to the full extent of the profile.
Definition at line 619 of file qgsquickelevationprofilecanvas.cpp.
|
slot |
Zooms to the full extent of the profile while maintaining X and Y axes' length ratio.
Definition at line 654 of file qgsquickelevationprofilecanvas.cpp.
|
readwrite |
Definition at line 46 of file qgsquickelevationprofilecanvas.h.
|
read |
The isRendering property is set to true while a rendering job is pending for this elevation profile canvas.
It can be used to show a notification icon about an ongoing rendering job. This is a readonly property.
Definition at line 58 of file qgsquickelevationprofilecanvas.h.
|
readwrite |
Definition at line 48 of file qgsquickelevationprofilecanvas.h.
|
readwrite |
Definition at line 44 of file qgsquickelevationprofilecanvas.h.
|
readwrite |
Definition at line 50 of file qgsquickelevationprofilecanvas.h.