QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
18 #ifndef QGSELEVATIONPROFILECANVAS_H
19 #define QGSELEVATIONPROFILECANVAS_H
21 #include "qgsconfig.h"
29 class QgsElevationProfilePlotItem;
30 class QgsElevationProfileCrossHairsItem;
62 void paintEvent( QPaintEvent *event )
override;
72 void scalePlot(
double xFactor,
double yFactor );
74 void zoomToRect(
const QRectF &rect )
override;
75 void wheelZoom( QWheelEvent *event )
override;
81 QRectF plotArea()
const;
93 void invalidateCurrentPlotExtent();
108 void setLayers(
const QList< QgsMapLayer * > &layers );
115 QList< QgsMapLayer * > layers()
const;
153 void setTolerance(
double tolerance );
172 void setVisiblePlotRange(
double minimumDistance,
double maximumDistance,
double minimumElevation,
double maximumElevation );
231 void activeJobCountChanged(
int count );
255 void setSnappingEnabled(
bool enabled );
259 void generationFinished();
260 void onLayerProfileGenerationPropertyChanged();
261 void onLayerProfileRendererPropertyChanged();
262 void regenerateResultsForLayer();
263 void scheduleDeferredRegeneration();
264 void scheduleDeferredRedraw();
265 void startDeferredRegeneration();
266 void startDeferredRedraw();
267 void refineResults();
274 void setupLayerConnections(
QgsMapLayer *layer,
bool isDisconnect );
281 QgsElevationProfilePlotItem *mPlotItem =
nullptr;
282 QgsElevationProfileCrossHairsItem *mCrossHairsItem =
nullptr;
285 QTimer *mDeferredRegenerationTimer =
nullptr;
286 bool mDeferredRegenerationScheduled = false;
287 QTimer *mDeferredRedrawTimer =
nullptr;
288 bool mDeferredRedrawScheduled = false;
291 double mTolerance = 0;
293 bool mFirstDrawOccurred = false;
295 bool mSnappingEnabled = true;
297 bool mZoomFullWhenJobFinished = true;
299 bool mForceRegenerationAfterCurrentJobCompletes = false;
301 static constexpr
double MAX_ERROR_PIXELS = 2;
304 #endif // QGSELEVATIONPROFILECANVAS_H
Encapsulates the context of identifying profile results.
Abstract base class for curved geometry type.
virtual void zoomToRect(const QRectF &rect)
Zooms the plot to the specified rect in canvas units.
void resizeEvent(QResizeEvent *e) override
virtual void cancelJobs()
Cancel any rendering job, in a blocking way.
QList< QgsWeakMapLayerPointer > QgsWeakMapLayerPointerList
A list of weak pointers to QgsMapLayers.
virtual QgsCoordinateReferenceSystem crs() const
Returns the coordinate reference system (CRS) for map coordinates used by the canvas.
Point geometry type, with support for z-dimension and m-values.
Base class for 2-dimensional plot/chart/graphs.
const QgsCoordinateReferenceSystem & crs
virtual QgsPointXY toCanvasCoordinates(const QgsPoint &point) const
Converts a point in map coordinates to the associated canvas point.
Contains information about the context of a rendering operation.
virtual void scalePlot(double factor)
Scales the plot by a specified scale factor.
Encapsulates the context of snapping a profile point.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
virtual void centerPlotOn(double x, double y)
Centers the plot on the plot point corresponding to x, y in canvas units.
Encapsulates a point on a distance-elevation profile.
std::unique_ptr< GEOSGeometry, GeosDeleter > unique_ptr
Scoped GEOS pointer.
Stores identify results generated by a QgsAbstractProfileResults object.
virtual void refresh()
Updates and redraws the plot.
A canvas for elevation profiles.
void mouseMoveEvent(QMouseEvent *e) override
This class represents a coordinate reference system (CRS).
Plot canvas is a class for displaying interactive 2d charts and plots.
A class to represent a 2D point.
virtual QgsPointXY snapToPlot(QPoint point)
Snap a canvas point to the plot.
QgsRange which stores a range of double values.
double tolerance() const
Returns the tolerance of the profile (in crs() units).
Base class for all map layer types. This is the base class for all map layer types (vector,...
virtual void panContentsBy(double dx, double dy)
Pans the plot contents by dx, dy in canvas units.
virtual QgsPoint toMapCoordinates(const QgsPointXY &point) const
Converts a point on the canvas to the associated map coordinate.
Abstract base class for storage of elevation profiles.
virtual void wheelZoom(QWheelEvent *event)
Zoom plot from a mouse wheel event.
Generates and renders elevation profile plots.