18#ifndef QGSELEVATIONPROFILECANVAS_H 
   19#define QGSELEVATIONPROFILECANVAS_H 
   29class QgsElevationProfilePlotItem;
 
   30class QgsElevationProfileCrossHairsItem;
 
   63    void paintEvent( QPaintEvent *event ) 
override;
 
   73    void scalePlot( 
double xFactor, 
double yFactor );
 
   75    void zoomToRect( 
const QRectF &rect ) 
override;
 
   76    void wheelZoom( QWheelEvent *event ) 
override;
 
   82    QRectF plotArea() 
const;
 
   94    void invalidateCurrentPlotExtent();
 
  109    void setLayers( 
const QList< QgsMapLayer * > &layers );
 
  116    QList< QgsMapLayer * > layers() 
const;
 
  154    void setTolerance( 
double tolerance );
 
  173    void setVisiblePlotRange( 
double minimumDistance, 
double maximumDistance, 
double minimumElevation, 
double maximumElevation );
 
  233    bool lockAxisScales() const;
 
  241    void setLockAxisScales( 
bool lock );
 
  249    Qgis::DistanceUnit distanceUnit() const;
 
  257    void setDistanceUnit( 
Qgis::DistanceUnit unit );
 
  264    void activeJobCountChanged( 
int count );
 
  288    void setSnappingEnabled( 
bool enabled );
 
  292    void generationFinished();
 
  293    void onLayerProfileGenerationPropertyChanged();
 
  294    void onLayerProfileRendererPropertyChanged();
 
  295    void regenerateResultsForLayer();
 
  296    void scheduleDeferredRegeneration();
 
  297    void scheduleDeferredRedraw();
 
  298    void startDeferredRegeneration();
 
  299    void startDeferredRedraw();
 
  300    void refineResults();
 
  307    void setupLayerConnections( 
QgsMapLayer *layer, 
bool isDisconnect );
 
  309    void adjustRangeForAxisScaleLock( 
double &xMinimum, 
double &xMaximum, 
double &yMinimum, 
double &yMaximum ) const;
 
  313    bool mLockAxisScales = false;
 
  317    Qgis::DistanceUnit mDistanceUnit = 
Qgis::DistanceUnit::Unknown;
 
  321    QgsElevationProfilePlotItem *mPlotItem = 
nullptr;
 
  322    QgsElevationProfileCrossHairsItem *mCrossHairsItem = 
nullptr;
 
  325    QTimer *mDeferredRegenerationTimer = 
nullptr;
 
  326    bool mDeferredRegenerationScheduled = false;
 
  327    QTimer *mDeferredRedrawTimer = 
nullptr;
 
  328    bool mDeferredRedrawScheduled = false;
 
  331    double mTolerance = 0;
 
  333    bool mFirstDrawOccurred = false;
 
  335    bool mSnappingEnabled = true;
 
  337    bool mZoomFullWhenJobFinished = true;
 
  339    bool mForceRegenerationAfterCurrentJobCompletes = false;
 
  341    static constexpr 
double MAX_ERROR_PIXELS = 2;
 
The Qgis class provides global constants for use throughout the application.
 
Base class for 2-dimensional plot/chart/graphs.
 
Abstract base class for storage of elevation profiles.
 
This class represents a coordinate reference system (CRS).
 
Abstract base class for curved geometry type.
 
QgsRange which stores a range of double values.
 
A canvas for elevation profiles.
 
double tolerance() const
Returns the tolerance of the profile (in crs() units).
 
Base class for all map layer types.
 
Plot canvas is a class for displaying interactive 2d charts and plots.
 
virtual void cancelJobs()
Cancel any rendering job, in a blocking way.
 
virtual void refresh()
Updates and redraws the plot.
 
virtual void zoomToRect(const QRectF &rect)
Zooms the plot to the specified rect in canvas units.
 
virtual void panContentsBy(double dx, double dy)
Pans the plot contents by dx, dy in canvas units.
 
virtual QgsPointXY toCanvasCoordinates(const QgsPoint &point) const
Converts a point in map coordinates to the associated canvas point.
 
void mouseMoveEvent(QMouseEvent *e) override
 
void resizeEvent(QResizeEvent *e) override
 
virtual void scalePlot(double factor)
Scales the plot by a specified scale factor.
 
virtual QgsCoordinateReferenceSystem crs() const
Returns the coordinate reference system (CRS) for map coordinates used by the canvas.
 
virtual void wheelZoom(QWheelEvent *event)
Zoom plot from a mouse wheel event.
 
virtual QgsPoint toMapCoordinates(const QgsPointXY &point) const
Converts a point on the canvas to the associated map coordinate.
 
virtual QgsPointXY snapToPlot(QPoint point)
Snap a canvas point to the plot.
 
virtual void centerPlotOn(double x, double y)
Centers the plot on the plot point corresponding to x, y in canvas units.
 
A class to represent a 2D point.
 
Point geometry type, with support for z-dimension and m-values.
 
Encapsulates the context of identifying profile results.
 
Stores identify results generated by a QgsAbstractProfileResults object.
 
Generates and renders elevation profile plots.
 
Encapsulates a point on a distance-elevation profile.
 
Encapsulates the context of snapping a profile point.
 
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
 
Contains information about the context of a rendering operation.
 
A utility class for dynamic handling of changes to screen properties.
 
std::unique_ptr< GEOSGeometry, GeosDeleter > unique_ptr
Scoped GEOS pointer.
 
QList< QgsWeakMapLayerPointer > QgsWeakMapLayerPointerList
A list of weak pointers to QgsMapLayers.
 
const QgsCoordinateReferenceSystem & crs