|
QGIS API Documentation 3.99.0-Master (26c88405ac0)
|
Represents an elevation profile attached to a project. More...
#include <qgselevationprofile.h>

Public Slots | |
| void | setCrs (const QgsCoordinateReferenceSystem &crs) |
| Sets the crs associated with the profile's map coordinates. | |
| void | setDistanceUnit (Qgis::DistanceUnit unit) |
| Sets the distance unit used by the profile. | |
| void | setLockAxisScales (bool lock) |
| Sets whether the distance and elevation scales are locked to each other. | |
| void | setName (const QString &name) |
| Sets the profile's unique name. | |
| void | setTolerance (double tolerance) |
| Sets the profile tolerance (in crs() units). | |
Signals | |
| void | nameChanged (const QString &newName) |
| Emitted when the profile is renamed. | |
Public Member Functions | |
| QgsElevationProfile (QgsProject *project) | |
| Constructor for QgsElevationProfile. | |
| ~QgsElevationProfile () override | |
| QgsCoordinateReferenceSystem | crs () const |
| Returns the crs associated with the profile's map coordinates. | |
| Qgis::DistanceUnit | distanceUnit () const |
| Returns the distance unit used by the profile. | |
| QIcon | icon () const |
| Returns the icon to use for the elevation profile. | |
| QgsLayerTree * | layerTree () |
| Returns the layer tree used by the profile. | |
| bool | lockAxisScales () const |
Returns true if the distance and elevation scales are locked to each other. | |
| QString | name () const |
| Returns the profile's unique name. | |
| QgsCurve * | profileCurve () const |
| Returns the profile curve. | |
| bool | readXml (const QDomElement &element, const QDomDocument &document, const QgsReadWriteContext &context) |
| Sets the profiles's state from a DOM element. | |
| void | resolveReferences (const QgsProject *project) |
| After reading settings from XML, resolves references to any layers in a project that have been read as layer IDs. | |
| void | setProfileCurve (QgsCurve *curve) |
| Sets the profile curve. | |
| void | setSubsectionsSymbol (QgsLineSymbol *symbol) |
| Sets the symbol used to draw the subsections. | |
| QgsLineSymbol * | subsectionsSymbol () |
| Returns the symbol used to draw the subsections. | |
| double | tolerance () const |
| Returns the tolerance of the profile (in crs() units). | |
| QDomElement | writeXml (QDomDocument &document, const QgsReadWriteContext &context) const |
| Returns the profiles's state encapsulated in a DOM element. | |
Represents an elevation profile attached to a project.
Definition at line 44 of file qgselevationprofile.h.
|
explicit |
Constructor for QgsElevationProfile.
Definition at line 25 of file qgselevationprofile.cpp.
|
overridedefault |
| QgsCoordinateReferenceSystem QgsElevationProfile::crs | ( | ) | const |
Returns the crs associated with the profile's map coordinates.
Definition at line 156 of file qgselevationprofile.cpp.
| Qgis::DistanceUnit QgsElevationProfile::distanceUnit | ( | ) | const |
Returns the distance unit used by the profile.
Definition at line 193 of file qgselevationprofile.cpp.
| QIcon QgsElevationProfile::icon | ( | ) | const |
Returns the icon to use for the elevation profile.
Definition at line 137 of file qgselevationprofile.cpp.
| QgsLayerTree * QgsElevationProfile::layerTree | ( | ) |
Returns the layer tree used by the profile.
Definition at line 142 of file qgselevationprofile.cpp.
| bool QgsElevationProfile::lockAxisScales | ( | ) | const |
Returns true if the distance and elevation scales are locked to each other.
Definition at line 188 of file qgselevationprofile.cpp.
|
inline |
Returns the profile's unique name.
Definition at line 62 of file qgselevationprofile.h.
|
signal |
| QgsCurve * QgsElevationProfile::profileCurve | ( | ) | const |
Returns the profile curve.
The CRS associated with the curve is retrieved via crs().
Definition at line 169 of file qgselevationprofile.cpp.
| bool QgsElevationProfile::readXml | ( | const QDomElement & | element, |
| const QDomDocument & | document, | ||
| const QgsReadWriteContext & | context ) |
Sets the profiles's state from a DOM element.
element is the DOM node corresponding to the profile.
Definition at line 71 of file qgselevationprofile.cpp.
| void QgsElevationProfile::resolveReferences | ( | const QgsProject * | project | ) |
After reading settings from XML, resolves references to any layers in a project that have been read as layer IDs.
Definition at line 132 of file qgselevationprofile.cpp.
|
slot |
Sets the crs associated with the profile's map coordinates.
Definition at line 147 of file qgselevationprofile.cpp.
|
slot |
Sets the distance unit used by the profile.
Definition at line 207 of file qgselevationprofile.cpp.
|
slot |
Sets whether the distance and elevation scales are locked to each other.
Definition at line 198 of file qgselevationprofile.cpp.
|
slot |
Sets the profile's unique name.
Definition at line 243 of file qgselevationprofile.cpp.
| void QgsElevationProfile::setProfileCurve | ( | QgsCurve * | curve | ) |
Sets the profile curve.
The CRS associated with curve is set via setCrs().
Ownership is transferred to the profile.
Definition at line 161 of file qgselevationprofile.cpp.
| void QgsElevationProfile::setSubsectionsSymbol | ( | QgsLineSymbol * | symbol | ) |
Sets the symbol used to draw the subsections.
If symbol is nullptr, the subsections are not drawn. Ownership of symbol is transferred.
Definition at line 234 of file qgselevationprofile.cpp.
|
slot |
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 174 of file qgselevationprofile.cpp.
| QgsLineSymbol * QgsElevationProfile::subsectionsSymbol | ( | ) |
Returns the symbol used to draw the subsections.
Definition at line 229 of file qgselevationprofile.cpp.
| double QgsElevationProfile::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.
Definition at line 183 of file qgselevationprofile.cpp.
| QDomElement QgsElevationProfile::writeXml | ( | QDomDocument & | document, |
| const QgsReadWriteContext & | context ) const |
Returns the profiles's state encapsulated in a DOM element.
Definition at line 34 of file qgselevationprofile.cpp.