1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/elevation/qgselevationprofilecanvas.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsElevationProfileCanvas : QgsPlotCanvas
{
%Docstring(signature="appended")
A canvas for elevation profiles.
.. versionadded:: 3.26
%End
%TypeHeaderCode
#include "qgselevationprofilecanvas.h"
%End
public:
QgsElevationProfileCanvas( QWidget *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsElevationProfileCanvas, with the specified ``parent``
widget.
%End
~QgsElevationProfileCanvas();
virtual QgsCoordinateReferenceSystem crs() const;
virtual QgsPoint toMapCoordinates( const QgsPointXY &point ) const;
virtual QgsPointXY toCanvasCoordinates( const QgsPoint &point ) const;
virtual void resizeEvent( QResizeEvent *event );
virtual void paintEvent( QPaintEvent *event );
virtual void panContentsBy( double dx, double dy );
virtual void centerPlotOn( double x, double y );
virtual void scalePlot( double factor );
virtual QgsPointXY snapToPlot( QPoint point );
void scalePlot( double xFactor, double yFactor );
%Docstring
Scales the plot axis by the given factors.
%End
virtual void zoomToRect( const QRectF &rect );
virtual void wheelZoom( QWheelEvent *event );
virtual void mouseMoveEvent( QMouseEvent *e );
QRectF plotArea() const;
%Docstring
Returns the interior rectangle representing the surface of the plot, in
canvas coordinates.
%End
virtual void refresh();
%Docstring
Triggers a complete regeneration of the profile, causing the profile
extraction to perform in the background.
%End
void invalidateCurrentPlotExtent();
%Docstring
Invalidates the current plot extent, which means that the visible plot
area will be recalculated and "zoom full" operation occur when the next
profile generation completes.
%End
void setProject( QgsProject *project );
%Docstring
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.
%End
void setLayers( const QList<QgsMapLayer *> &layers );
%Docstring
Sets the list of ``layers`` to include in the profile.
.. seealso:: :py:func:`layers`
%End
QList<QgsMapLayer *> layers() const;
%Docstring
Returns the list of layers included in the profile.
.. seealso:: :py:func:`setLayers`
%End
void setCrs( const QgsCoordinateReferenceSystem &crs );
%Docstring
Sets the ``crs`` associated with the canvas' map coordinates.
.. seealso:: :py:func:`crs`
%End
void setProfileCurve( QgsCurve *curve /Transfer/ );
%Docstring
Sets the profile ``curve``.
The CRS associated with ``curve`` is set via
:py:func:`~QgsElevationProfileCanvas.setCrs`.
Ownership is transferred to the plot canvas.
.. seealso:: :py:func:`profileCurve`
%End
QgsCurve *profileCurve() const;
%Docstring
Returns the profile curve.
The CRS associated with the curve is retrieved via
:py:func:`~QgsElevationProfileCanvas.crs`.
.. seealso:: :py:func:`setProfileCurve`
%End
void setTolerance( double tolerance );
%Docstring
Sets the profile tolerance (in :py:func:`~QgsElevationProfileCanvas.crs`
units).
This value determines how far from the
:py:func:`~QgsElevationProfileCanvas.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.
.. seealso:: :py:func:`tolerance`
%End
double tolerance() const;
%Docstring
Returns the tolerance of the profile (in
:py:func:`~QgsElevationProfileCanvas.crs` units).
This value determines how far from the
:py:func:`~QgsElevationProfileCanvas.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.
.. seealso:: :py:func:`setTolerance`
%End
void setVisiblePlotRange( double minimumDistance, double maximumDistance, double minimumElevation, double maximumElevation );
%Docstring
Sets the visible area of the plot.
.. seealso:: :py:func:`visibleDistanceRange`
.. seealso:: :py:func:`visibleElevationRange`
%End
QgsDoubleRange visibleDistanceRange() const;
%Docstring
Returns the distance range currently visible in the plot.
.. seealso:: :py:func:`visibleElevationRange`
.. seealso:: :py:func:`setVisiblePlotRange`
%End
QgsDoubleRange visibleElevationRange() const;
%Docstring
Returns the elevation range currently visible in the plot.
.. seealso:: :py:func:`visibleDistanceRange`
.. seealso:: :py:func:`setVisiblePlotRange`
%End
void render( QgsRenderContext &context, double width, double height, const Qgs2DPlot &plotSettings );
%Docstring
Renders a portion of the profile using the specified render ``context``.
%End
QVector<QgsProfileIdentifyResults> identify( QPointF point );
%Docstring
Identify results visible at the specified plot point.
%End
QVector<QgsProfileIdentifyResults> identify( const QRectF &rect );
%Docstring
Identify results visible within the specified plot rect.
%End
QgsProfilePoint canvasPointToPlotPoint( QPointF point ) const;
%Docstring
Converts a canvas point to the equivalent plot point.
.. seealso:: :py:func:`plotPointToCanvasPoint`
%End
QgsPointXY plotPointToCanvasPoint( const QgsProfilePoint &point ) const;
%Docstring
Converts a plot point to the equivalent canvas point.
.. seealso:: :py:func:`canvasPointToPlotPoint`
%End
bool lockAxisScales() const;
%Docstring
Returns ``True`` if the distance and elevation scales are locked to each
other.
.. seealso:: :py:func:`setLockAxisScales`
.. versionadded:: 3.32
%End
void setLockAxisScales( bool lock );
%Docstring
Sets whether the distance and elevation scales are locked to each other.
.. seealso:: :py:func:`lockAxisScales`
.. versionadded:: 3.32
%End
Qgis::DistanceUnit distanceUnit() const;
%Docstring
Returns the distance unit used by the canvas.
.. seealso:: :py:func:`setDistanceUnit`
.. versionadded:: 3.32
%End
void setDistanceUnit( Qgis::DistanceUnit unit );
%Docstring
Sets the distance ``unit`` used by the canvas.
.. seealso:: :py:func:`distanceUnit`
.. versionadded:: 3.32
%End
void setBackgroundColor( const QColor &color );
%Docstring
Sets the background ``color`` to use for the profile canvas.
The chart text, border and axis color will be automatically updated to
ensure readability with the new background color.
.. versionadded:: 3.34
%End
signals:
void activeJobCountChanged( int count );
%Docstring
Emitted when the number of active background jobs changes.
%End
void canvasPointHovered( const QgsPointXY &point, const QgsProfilePoint &profilePoint );
%Docstring
Emitted when the mouse hovers over the specified point (in canvas
coordinates).
The ``profilePoint`` argument gives the hovered profile point, which may
be snapped.
%End
public slots:
void zoomFull();
%Docstring
Zooms to the full extent of the profile.
%End
void clear();
%Docstring
Clears the current profile.
%End
void setSnappingEnabled( bool enabled );
%Docstring
Sets whether snapping of cursor points is enabled.
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/elevation/qgselevationprofilecanvas.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
|