18#ifndef QGSELEVATIONPROFILECANVAS_H
19#define QGSELEVATIONPROFILECANVAS_H
21#include "qgis_quick.h"
30class QgsElevationProfilePlotItem;
67 QSGNode *
updatePaintNode( QSGNode *oldNode, QQuickItem::UpdatePaintNodeData * ) override;
99 Q_INVOKABLE
void populateLayersFromProject();
106 QList<QgsMapLayer *> layers()
const;
147 void setTolerance(
double tolerance );
166 void setVisiblePlotRange(
double minimumDistance,
double maximumDistance,
double minimumElevation,
double maximumElevation );
205 void geometryChange(
const QRectF &newGeometry,
const QRectF &oldGeometry )
override;
223 Q_INVOKABLE
void clear();
227 void generationFinished();
228 void onLayerProfileGenerationPropertyChanged();
229 void onLayerProfileRendererPropertyChanged();
230 void regenerateResultsForLayer();
231 void scheduleDeferredRegeneration();
232 void scheduleDeferredRedraw();
233 void startDeferredRegeneration();
234 void startDeferredRedraw();
235 void refineResults();
238 void setupLayerConnections(
QgsMapLayer *layer,
bool isDisconnect );
247 QgsElevationProfilePlotItem *mPlotItem =
nullptr;
250 QTimer *mDeferredRegenerationTimer =
nullptr;
251 bool mDeferredRegenerationScheduled =
false;
252 QTimer *mDeferredRedrawTimer =
nullptr;
253 bool mDeferredRedrawScheduled =
false;
256 double mTolerance = 0;
258 bool mZoomFullWhenJobFinished =
true;
260 bool mForceRegenerationAfterCurrentJobCompletes =
false;
262 static constexpr double MAX_ERROR_PIXELS = 2;
Represents a coordinate reference system (CRS).
QgsRange which stores a range of double values.
A geometry is the spatial representation of a feature.
Base class for all map layer types.
Generates and renders elevation profile plots.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override
QgsGeometry profileCurve() const
Returns the profile curve geometry.
void cancelJobs()
Cancel any rendering job in a blocking way.
void setTolerance(double tolerance)
Sets the profile tolerance (in crs() units).
QgsQuickElevationProfileCanvas(QQuickItem *parent=nullptr)
Constructor for QgsElevationProfileCanvas, with the specified parent widget.
void activeJobCountChanged(int count)
Emitted when the number of active background jobs changes.
void setProfileCurve(QgsGeometry curve)
Sets the profile curve geometry.
void crsChanged()
Emitted when the CRS linked to the profile curve geometry changes.
QgsCoordinateReferenceSystem crs() const
Returns the crs associated with map coordinates.
QgsCoordinateReferenceSystem crs
bool isRendering
The isRendering property is set to true while a rendering job is pending for this elevation profile c...
void setProject(QgsProject *project)
Sets the project associated with the profile.
void profileCurveChanged()
Emitted when the profile curve geometry changes.
Q_INVOKABLE void refresh()
Triggers a complete regeneration of the profile, causing the profile extraction to perform in the bac...
QSGNode * updatePaintNode(QSGNode *oldNode, QQuickItem::UpdatePaintNodeData *) override
void setCrs(const QgsCoordinateReferenceSystem &crs)
Sets the crs associated with the map coordinates.
Q_INVOKABLE void clear()
Clears the current profile.
void projectChanged()
Emitted when the associated project changes.
double tolerance() const
Returns the tolerance of the profile (in crs() units).
void toleranceChanged()
Emitted when the tolerance changes.
Q_INVOKABLE void zoomFull()
Zooms to the full extent of the profile.
void isRenderingChanged()
The isRendering property is set to true while a rendering job is pending for this elevation profile c...
Q_INVOKABLE void zoomFullInRatio()
Zooms to the full extent of the profile while maintaining X and Y axes' length ratio.
QList< QgsWeakMapLayerPointer > QgsWeakMapLayerPointerList
A list of weak pointers to QgsMapLayers.