QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
Public Slots | Signals | Public Member Functions | Protected Member Functions | Properties | List of all members
QgsQuickElevationProfileCanvas Class Reference

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>

Inheritance diagram for QgsQuickElevationProfileCanvas:
Inheritance graph
[legend]

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.
 
QgsProjectproject () 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
 
QgsProjectproject
 
double tolerance
 

Detailed Description

This class implements a visual Qt Quick Item that does elevation profile rendering according to the current project settings and a profile curve geometry.

Since
QGIS 3.30

Definition at line 40 of file qgsquickelevationprofilecanvas.h.

Constructor & Destructor Documentation

◆ QgsQuickElevationProfileCanvas()

PRIVATE QgsQuickElevationProfileCanvas::QgsQuickElevationProfileCanvas ( QQuickItem *  parent = nullptr)
explicit

Constructor for QgsElevationProfileCanvas, with the specified parent widget.

Definition at line 143 of file qgsquickelevationprofilecanvas.cpp.

◆ ~QgsQuickElevationProfileCanvas()

QgsQuickElevationProfileCanvas::~QgsQuickElevationProfileCanvas ( )

Definition at line 163 of file qgsquickelevationprofilecanvas.cpp.

Member Function Documentation

◆ activeJobCountChanged

void QgsQuickElevationProfileCanvas::activeJobCountChanged ( int  count)
signal

Emitted when the number of active background jobs changes.

◆ cancelJobs()

void QgsQuickElevationProfileCanvas::cancelJobs ( )

Cancel any rendering job in a blocking way.

Definition at line 173 of file qgsquickelevationprofilecanvas.cpp.

◆ clear

void QgsQuickElevationProfileCanvas::clear ( )
slot

Clears the current profile.

Definition at line 726 of file qgsquickelevationprofilecanvas.cpp.

◆ crs()

QgsCoordinateReferenceSystem QgsQuickElevationProfileCanvas::crs ( ) const
inline

Returns the crs associated with map coordinates.

Definition at line 112 of file qgsquickelevationprofilecanvas.h.

◆ crsChanged

void QgsQuickElevationProfileCanvas::crsChanged ( )
signal

Emitted when the CRS linked to the profile curve geometry changes.

◆ geometryChange()

void QgsQuickElevationProfileCanvas::geometryChange ( const QRectF &  newGeometry,
const QRectF &  oldGeometry 
)
overrideprotected

Definition at line 554 of file qgsquickelevationprofilecanvas.cpp.

◆ isRendering()

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.

◆ isRenderingChanged

void QgsQuickElevationProfileCanvas::isRenderingChanged ( )
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.

◆ layers()

QList< QgsMapLayer * > QgsQuickElevationProfileCanvas::layers ( ) const

Returns the list of layers included in the profile.

See also
layers()

Definition at line 544 of file qgsquickelevationprofilecanvas.cpp.

◆ populateLayersFromProject()

void QgsQuickElevationProfileCanvas::populateLayersFromProject ( )

Populates the current profile with elevation-enabled layers from the associated project.

Definition at line 503 of file qgsquickelevationprofilecanvas.cpp.

◆ profileCurve()

QgsGeometry QgsQuickElevationProfileCanvas::profileCurve ( ) const
inline

Returns the profile curve geometry.

The CRS associated with the curve is retrieved via crs().

See also
setProfileCurve()

Definition at line 137 of file qgsquickelevationprofilecanvas.h.

◆ profileCurveChanged

void QgsQuickElevationProfileCanvas::profileCurveChanged ( )
signal

Emitted when the profile curve geometry changes.

◆ project()

QgsProject * QgsQuickElevationProfileCanvas::project ( ) const
inline

Returns the project associated with the profile.

Definition at line 87 of file qgsquickelevationprofilecanvas.h.

◆ projectChanged

void QgsQuickElevationProfileCanvas::projectChanged ( )
signal

Emitted when the associated project changes.

◆ refresh()

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.

◆ setCrs()

void QgsQuickElevationProfileCanvas::setCrs ( const QgsCoordinateReferenceSystem crs)

Sets the crs associated with the map coordinates.

See also
crs()

Definition at line 473 of file qgsquickelevationprofilecanvas.cpp.

◆ setProfileCurve()

void QgsQuickElevationProfileCanvas::setProfileCurve ( QgsGeometry  curve)

Sets the profile curve geometry.

The CRS associated with curve is set via setCrs().

See also
profileCurve()

Definition at line 483 of file qgsquickelevationprofilecanvas.cpp.

◆ setProject()

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.

◆ setTolerance()

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.

See also
tolerance()

Definition at line 493 of file qgsquickelevationprofilecanvas.cpp.

◆ setVisiblePlotRange()

void QgsQuickElevationProfileCanvas::setVisiblePlotRange ( double  minimumDistance,
double  maximumDistance,
double  minimumElevation,
double  maximumElevation 
)

Sets the visible area of the plot.

See also
visibleDistanceRange()
visibleElevationRange()

Definition at line 707 of file qgsquickelevationprofilecanvas.cpp.

◆ tolerance()

double QgsQuickElevationProfileCanvas::tolerance ( ) const
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.

See also
setTolerance()

Definition at line 159 of file qgsquickelevationprofilecanvas.h.

◆ toleranceChanged

void QgsQuickElevationProfileCanvas::toleranceChanged ( )
signal

Emitted when the tolerance changes.

◆ updatePaintNode()

QSGNode * QgsQuickElevationProfileCanvas::updatePaintNode ( QSGNode *  oldNode,
QQuickItem::UpdatePaintNodeData *   
)
override

Definition at line 563 of file qgsquickelevationprofilecanvas.cpp.

◆ visibleDistanceRange()

QgsDoubleRange QgsQuickElevationProfileCanvas::visibleDistanceRange ( ) const

Returns the distance range currently visible in the plot.

See also
visibleElevationRange()
setVisiblePlotRange()

Definition at line 716 of file qgsquickelevationprofilecanvas.cpp.

◆ visibleElevationRange()

QgsDoubleRange QgsQuickElevationProfileCanvas::visibleElevationRange ( ) const

Returns the elevation range currently visible in the plot.

See also
visibleDistanceRange()
setVisiblePlotRange()

Definition at line 721 of file qgsquickelevationprofilecanvas.cpp.

◆ zoomFull

void QgsQuickElevationProfileCanvas::zoomFull ( )
slot

Zooms to the full extent of the profile.

Definition at line 619 of file qgsquickelevationprofilecanvas.cpp.

◆ zoomFullInRatio

void QgsQuickElevationProfileCanvas::zoomFullInRatio ( )
slot

Zooms to the full extent of the profile while maintaining X and Y axes' length ratio.

Note
This method only makes sense with CRSes having matching map units and elevation units types.

Definition at line 654 of file qgsquickelevationprofilecanvas.cpp.

Property Documentation

◆ crs

QgsCoordinateReferenceSystem QgsQuickElevationProfileCanvas::crs
readwrite

Definition at line 46 of file qgsquickelevationprofilecanvas.h.

◆ isRendering

bool QgsQuickElevationProfileCanvas::isRendering
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.

◆ profileCurve

QgsGeometry QgsQuickElevationProfileCanvas::profileCurve
readwrite

Definition at line 48 of file qgsquickelevationprofilecanvas.h.

◆ project

QgsProject * QgsQuickElevationProfileCanvas::project
readwrite

Definition at line 44 of file qgsquickelevationprofilecanvas.h.

◆ tolerance

double QgsQuickElevationProfileCanvas::tolerance
readwrite

Definition at line 50 of file qgsquickelevationprofilecanvas.h.


The documentation for this class was generated from the following files: