Class QgsQuickElevationProfileCanvas
ClassList > QgsQuickElevationProfileCanvas
#include <qgsquickelevationprofilecanvas.h>
Inherits the following classes: QQuickItem
Public Slots
| Type | Name |
|---|---|
| slot Q_INVOKABLE void | clear |
| slot Q_INVOKABLE void | zoomFull |
| slot Q_INVOKABLE void | zoomFullInRatio |
Public Properties
| Type | Name |
|---|---|
| property QColor | axisLabelColor |
| property double | axisLabelSize |
| property QColor | backgroundColor |
| property QColor | borderColor |
| property QgsCoordinateReferenceSystem | crs |
| property bool | isRendering |
| property QgsGeometry | profileCurve |
| property QgsProject * | project |
| property double | tolerance |
Public Signals
| Type | Name |
|---|---|
| signal void | activeJobCountChanged (int count) Emitted when the number of active background jobs changes. |
| signal void | axisLabelColorChanged Emitted when the axis label color changes. |
| signal void | axisLabelSizeChanged Emitted when the axis label size (in point) changes. |
| signal void | backgroundColorChanged Emitted when the background color changes. |
| signal void | borderColorChanged Emitted when the border color changes. |
| signal void | crsChanged Emitted when the CRS linked to the profile curve geometry changes. |
| signal void | isRenderingChanged |
| signal void | profileCurveChanged Emitted when the profile curve geometry changes. |
| signal void | projectChanged Emitted when the associated project changes. |
| signal void | toleranceChanged Emitted when the tolerance changes. |
Public Functions
| Type | Name |
|---|---|
| QgsQuickElevationProfileCanvas (QQuickItem * parent=nullptr) |
|
| QColor | axisLabelColor () const |
| double | axisLabelSize () const |
| QColor | backgroundColor () const |
| QColor | borderColor () const |
| void | cancelJobs () |
| QgsCoordinateReferenceSystem | crs () const |
| bool | isRendering () const |
| QList< QgsMapLayer * > | layers () const |
| Q_INVOKABLE void | populateLayersFromProject () |
| QgsGeometry | profileCurve () const |
| QgsProject * | project () const |
| Q_INVOKABLE void | refresh () |
| void | setAxisLabelColor (const QColor & color) |
| void | setAxisLabelSize (double size) |
| void | setBackgroundColor (const QColor & color) |
| void | setBorderColor (const QColor & color) |
| void | setCrs (const QgsCoordinateReferenceSystem & crs) |
| void | setProfileCurve (QgsGeometry curve) |
| void | setProject (QgsProject * project) |
| void | setTolerance (double tolerance) |
| void | setVisiblePlotRange (double minimumDistance, double maximumDistance, double minimumElevation, double maximumElevation) |
| double | tolerance () const |
| QSGNode * | updatePaintNode (QSGNode * oldNode, QQuickItem::UpdatePaintNodeData *) override |
| QgsDoubleRange | visibleDistanceRange () const |
| QgsDoubleRange | visibleElevationRange () const |
| ~QgsQuickElevationProfileCanvas () |
Protected Functions
| Type | Name |
|---|---|
| void | geometryChange (const QRectF & newGeometry, const QRectF & oldGeometry) override |
Detailed Description
Implements a visual Qt Quick Item that does elevation profile rendering according to the current project settings and a profile curve geometry.
Public Properties Documentation
property axisLabelColor [1/2]
QColor QgsQuickElevationProfileCanvas::axisLabelColor;
property axisLabelSize [1/2]
double QgsQuickElevationProfileCanvas::axisLabelSize;
property backgroundColor [1/2]
QColor QgsQuickElevationProfileCanvas::backgroundColor;
property borderColor [1/2]
QColor QgsQuickElevationProfileCanvas::borderColor;
property crs [1/2]
QgsCoordinateReferenceSystem QgsQuickElevationProfileCanvas::crs;
property isRendering [1/2]
bool QgsQuickElevationProfileCanvas::isRendering;
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.
property profileCurve [1/2]
QgsGeometry QgsQuickElevationProfileCanvas::profileCurve;
property project [1/2]
QgsProject * QgsQuickElevationProfileCanvas::project;
property tolerance [1/2]
double QgsQuickElevationProfileCanvas::tolerance;
Public Slots Documentation
slot clear
void QgsQuickElevationProfileCanvas::clear;
Clears the current profile.
slot zoomFull
void QgsQuickElevationProfileCanvas::zoomFull;
Zooms to the full extent of the profile.
slot zoomFullInRatio
void QgsQuickElevationProfileCanvas::zoomFullInRatio;
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.
Public Signals Documentation
signal activeJobCountChanged
Emitted when the number of active background jobs changes.
void QgsQuickElevationProfileCanvas::activeJobCountChanged;
signal axisLabelColorChanged
Emitted when the axis label color changes.
void QgsQuickElevationProfileCanvas::axisLabelColorChanged;
signal axisLabelSizeChanged
Emitted when the axis label size (in point) changes.
void QgsQuickElevationProfileCanvas::axisLabelSizeChanged;
signal backgroundColorChanged
Emitted when the background color changes.
void QgsQuickElevationProfileCanvas::backgroundColorChanged;
signal borderColorChanged
Emitted when the border color changes.
void QgsQuickElevationProfileCanvas::borderColorChanged;
signal crsChanged
Emitted when the CRS linked to the profile curve geometry changes.
void QgsQuickElevationProfileCanvas::crsChanged;
signal isRenderingChanged
void QgsQuickElevationProfileCanvas::isRenderingChanged;
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 profileCurveChanged
Emitted when the profile curve geometry changes.
void QgsQuickElevationProfileCanvas::profileCurveChanged;
signal projectChanged
Emitted when the associated project changes.
void QgsQuickElevationProfileCanvas::projectChanged;
signal toleranceChanged
Emitted when the tolerance changes.
void QgsQuickElevationProfileCanvas::toleranceChanged;
Public Functions Documentation
function QgsQuickElevationProfileCanvas
explicit QgsQuickElevationProfileCanvas::QgsQuickElevationProfileCanvas (
QQuickItem * parent=nullptr
)
Constructor for QgsElevationProfileCanvas, with the specified parent widget.
function axisLabelColor [2/2]
QColor QgsQuickElevationProfileCanvas::axisLabelColor () const
Returns the axis label color used when rendering the elevation profile.
See also: setAxisLabelColor
function axisLabelSize [2/2]
double QgsQuickElevationProfileCanvas::axisLabelSize () const
Returns the axis label size (in point) used when rendering the elevation profile.
See also: setAxisLabelSize
function backgroundColor [2/2]
QColor QgsQuickElevationProfileCanvas::backgroundColor () const
Returns the background color used when rendering the elevation profile.
See also: setBackgroundColor
function borderColor [2/2]
QColor QgsQuickElevationProfileCanvas::borderColor () const
Returns the border color used when rendering the elevation profile.
See also: setBorderColor
function cancelJobs
void QgsQuickElevationProfileCanvas::cancelJobs ()
function crs [2/2]
inline QgsCoordinateReferenceSystem QgsQuickElevationProfileCanvas::crs () const
Returns the crs associated with map coordinates
function isRendering [2/2]
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.
function layers
QList< QgsMapLayer * > QgsQuickElevationProfileCanvas::layers () const
Returns the list of layers included in the profile.
See also: layers()
function populateLayersFromProject
Q_INVOKABLE void QgsQuickElevationProfileCanvas::populateLayersFromProject ()
Populates the current profile with elevation-enabled layers from the associated project.
function profileCurve [2/2]
inline QgsGeometry QgsQuickElevationProfileCanvas::profileCurve () const
Returns the profile curve geometry.
The CRS associated with the curve is retrieved via crs().
See also: setProfileCurve()
function project [2/2]
inline QgsProject * QgsQuickElevationProfileCanvas::project () const
Returns the project associated with the profile.
function refresh
Q_INVOKABLE void QgsQuickElevationProfileCanvas::refresh ()
Triggers a complete regeneration of the profile, causing the profile extraction to perform in the background.
function setAxisLabelColor
void QgsQuickElevationProfileCanvas::setAxisLabelColor (
const QColor & color
)
Sets the axis label color used when rendering the elevation profile.
See also: axisLabelColor
function setAxisLabelSize
void QgsQuickElevationProfileCanvas::setAxisLabelSize (
double size
)
Sets the axis label size (in point) used when rendering the elevation profile.
See also: axisLabelSize
function setBackgroundColor
void QgsQuickElevationProfileCanvas::setBackgroundColor (
const QColor & color
)
Sets the background color used when rendering the elevation profile.
See also: backgroundColor
function setBorderColor
void QgsQuickElevationProfileCanvas::setBorderColor (
const QColor & color
)
Sets the border color used when rendering the elevation profile.
See also: borderColor
function setCrs
void QgsQuickElevationProfileCanvas::setCrs (
const QgsCoordinateReferenceSystem & crs
)
Sets the crs associated with the map coordinates.
See also: crs()
function setProfileCurve
void QgsQuickElevationProfileCanvas::setProfileCurve (
QgsGeometry curve
)
Sets the profile curve geometry.
The CRS associated with curve is set via setCrs().
See also: profileCurve()
function 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.
function 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()
function setVisiblePlotRange
void QgsQuickElevationProfileCanvas::setVisiblePlotRange (
double minimumDistance,
double maximumDistance,
double minimumElevation,
double maximumElevation
)
Sets the visible area of the plot.
See also: visibleDistanceRange()
See also: visibleElevationRange()
function tolerance [2/2]
inline double QgsQuickElevationProfileCanvas::tolerance () const
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()
function updatePaintNode
QSGNode * QgsQuickElevationProfileCanvas::updatePaintNode (
QSGNode * oldNode,
QQuickItem::UpdatePaintNodeData *
) override
function visibleDistanceRange
QgsDoubleRange QgsQuickElevationProfileCanvas::visibleDistanceRange () const
Returns the distance range currently visible in the plot.
See also: visibleElevationRange()
See also: setVisiblePlotRange()
function visibleElevationRange
QgsDoubleRange QgsQuickElevationProfileCanvas::visibleElevationRange () const
Returns the elevation range currently visible in the plot.
See also: visibleDistanceRange()
See also: setVisiblePlotRange()
function ~QgsQuickElevationProfileCanvas
QgsQuickElevationProfileCanvas::~QgsQuickElevationProfileCanvas ()
Protected Functions Documentation
function geometryChange
void QgsQuickElevationProfileCanvas::geometryChange (
const QRectF & newGeometry,
const QRectF & oldGeometry
) override
The documentation for this class was generated from the following file src/core/qgsquick/qgsquickelevationprofilecanvas.h