QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
48 , mCaptureMode( mode )
49 , mCaptureModeFromLayer( mode == CaptureNone )
58 this, &QgsMapToolCapture::currentLayerChanged );
63 mExtraSnapLayer =
new QgsVectorLayer( QStringLiteral(
"LineString?crs=" ), QStringLiteral(
"extra snap" ), QStringLiteral(
"memory" ), layerOptions );
67 mExtraSnapFeatureId = f.
id();
70 this, &QgsMapToolCapture::updateExtraSnapLayer );
83 mCanvas->snappingUtils()->removeExtraSnapLayer( mExtraSnapLayer );
85 mExtraSnapLayer->deleteLater();
86 mExtraSnapLayer =
nullptr;
92 mValidator->deleteLater();
118 if ( mTempRubberBand )
119 mTempRubberBand->show();
121 mCanvas->snappingUtils()->addExtraSnapLayer( mExtraSnapLayer );
125 mCurrentShapeMapTool->
activate( mCaptureMode, mCaptureLastPoint );
130 if ( mTempRubberBand )
131 mTempRubberBand->hide();
135 mCanvas->snappingUtils()->removeExtraSnapLayer( mExtraSnapLayer );
143 void QgsMapToolCapture::currentLayerChanged(
QgsMapLayer *layer )
145 if ( !mCaptureModeFromLayer )
172 if ( mTempRubberBand )
180 bool QgsMapToolCapture::tracingEnabled()
188 QgsPointXY QgsMapToolCapture::tracingStartPoint()
193 return mTracingStartPoint;
195 return mCaptureLastPoint;
221 mTempRubberBand->addPoint( mCaptureLastPoint );
227 const QgsPoint lastPoint = mCaptureLastPoint;
229 if ( lastPointXY == pt0 &&
points[0] != lastPointXY )
245 for (
int i = 1; i <
points.count(); ++i )
256 bool QgsMapToolCapture::tracingAddVertex(
const QgsPointXY &point )
262 if ( mTempRubberBand->pointsCount() == 0 )
264 if ( !tracer->
init() )
274 mTracingStartPoint = point;
291 for (
int i = 0; i <
points.count(); ++i )
300 mCaptureCurve.
moveVertex( lastVertexId, layerPoints.first() );
301 mSnappingMatches.removeLast();
304 int pointBefore = mCaptureCurve.
numPoints();
314 if ( vlayer &&
capabilities().testFlag( QgsMapToolCapture::Capability::SupportsCurves ) && vlayer->
dataProvider()->
capabilities().testFlag( QgsVectorDataProvider::Capability::CircularGeometries ) )
323 mCaptureCurve.
clear();
324 mCaptureCurve.
addCurve( qgsgeometry_cast< const QgsCurve * >( curved.
constGet() )->clone() );
328 mCaptureCurve = *qgsgeometry_cast<QgsCompoundCurve *>( curved.
constGet() );
334 const int pointAfter = mCaptureCurve.
numPoints();
335 for ( ; pointBefore < pointAfter; ++pointBefore )
347 QgsMapToolCaptureRubberBand *QgsMapToolCapture::createCurveRubberBand()
const
349 QgsMapToolCaptureRubberBand *rb =
new QgsMapToolCaptureRubberBand(
mCanvas );
354 color.setAlphaF( color.alphaF() * alphaScale );
355 rb->setLineStyle( Qt::DotLine );
356 rb->setStrokeColor( color );
359 rb->setFillColor( fillColor );
364 void QgsMapToolCapture::resetRubberBand()
397 if ( mCurrentCaptureTechnique == technique )
400 mStartNewCurve =
true;
426 if ( mTempRubberBand )
427 mTempRubberBand->setStringType( mLineDigitizingType );
429 mCurrentCaptureTechnique = technique;
434 mCurrentShapeMapTool->
activate( mCaptureMode, mCaptureLastPoint );
440 if ( mCurrentShapeMapTool )
442 if ( shapeMapToolMetadata && mCurrentShapeMapTool->
id() == shapeMapToolMetadata->
id() )
446 mCurrentShapeMapTool->deleteLater();
449 mCurrentShapeMapTool.
reset( shapeMapToolMetadata ? shapeMapToolMetadata->
factory(
this ) :
nullptr );
454 if ( mCurrentShapeMapTool )
455 mCurrentShapeMapTool->
activate( mCaptureMode, mCaptureLastPoint );
469 if ( !mCurrentShapeMapTool )
471 emit
messageEmitted( tr(
"Select an option from the Shape Digitizing Toolbar in order to capture shapes" ), Qgis::MessageLevel::Warning );
475 if ( !mTempRubberBand )
477 mTempRubberBand.
reset( createCurveRubberBand() );
478 mTempRubberBand->setStringType( mLineDigitizingType );
490 if ( mCaptureMode !=
CapturePoint && mTempRubberBand && mCapturing )
492 bool hasTrace =
false;
496 if ( !mCaptureCurve.
isEmpty() )
503 mAllowAddingStreamingPoints =
true;
505 mAllowAddingStreamingPoints =
false;
507 else if ( tracingEnabled() && mCaptureCurve.
numPoints() != 0 )
514 mTempRubberBand->curveIsComplete() )
515 mCircularItermediatePoint = mTempRubberBand->pointFromEnd( 1 );
517 !mTempRubberBand->curveIsComplete() )
518 mCircularItermediatePoint =
QgsPoint();
520 hasTrace = tracingMouseMove( e );
526 mTempRubberBand->addPoint( mCaptureLastPoint );
527 if ( !mCircularItermediatePoint.
isEmpty() )
529 mTempRubberBand->movePoint( mCircularItermediatePoint );
530 mTempRubberBand->addPoint( mCircularItermediatePoint );
539 const QgsPoint mapPt = mCaptureLastPoint;
541 if ( mTempRubberBand )
543 mTempRubberBand->movePoint(
mapPoint );
544 mTempRubberBand->movePoint( 0, mapPt );
551 else if ( mTempRubberBand )
552 mTempRubberBand->movePoint(
mapPoint );
574 QgsDebugMsg( QStringLiteral(
"transformation to layer coordinate failed" ) );
608 ( sourceLayer->
crs() == vlayer->
crs() ) )
673 QgsDebugMsg( QStringLiteral(
"invalid capture mode" ) );
702 mSnappingMatches.append( match );
706 if ( mCaptureFirstPoint.
isEmpty() )
714 if ( !mTempRubberBand )
716 mTempRubberBand.
reset( createCurveRubberBand() );
717 mTempRubberBand->setStringType( mLineDigitizingType );
721 bool traceCreated =
false;
722 if ( tracingEnabled() )
724 traceCreated = tracingAddVertex(
mapPoint );
729 mTracingStartPoint = traceCreated ? point :
QgsPointXY();
734 mTempRubberBand->movePoint(
mapPoint );
735 if ( mTempRubberBand->curveIsComplete() )
737 if (
QgsCurve *curve = mTempRubberBand->curve() )
742 if ( match.
isValid() && mSnappingMatches.count() > 0 && !mSnappingMatches.last().isValid() )
744 mSnappingMatches.removeLast();
748 mSnappingMatches.removeLast();
749 mSnappingMatches.append( mCircularIntermediateMatch );
751 mSnappingMatches.append( match );
757 else if ( mTempRubberBand->pointsCount() == 0 )
761 mSnappingMatches.append( match );
767 mCircularIntermediateMatch = match;
771 mTempRubberBand->addPoint(
mapPoint );
776 mTempRubberBand->addPoint( mCaptureLastPoint );
780 updateExtraSnapLayer();
798 if ( mTempRubberBand )
802 mTempRubberBand->addPoint( endPt );
809 c->transform( ct, Qgis::TransformDirection::Reverse );
811 const int countBefore = mCaptureCurve.
vertexCount();
818 mCaptureCurve.
addCurve(
c, !mStartNewCurve );
819 mStartNewCurve =
false;
821 const int countAfter = mCaptureCurve.
vertexCount();
822 const int addedPoint = countAfter - countBefore;
824 updateExtraSnapLayer();
826 for (
int i = 0; i < addedPoint; ++i )
836 mCaptureCurve.
clear();
837 updateExtraSnapLayer();
842 return mSnappingMatches;
849 if ( mTempRubberBand )
851 if (
size() <= 1 && mTempRubberBand->pointsCount() != 0 )
854 if ( isAutoRepeat && mIgnoreSubsequentAutoRepeatUndo )
856 mIgnoreSubsequentAutoRepeatUndo =
false;
858 const QgsPoint lastPoint = mTempRubberBand->lastPoint();
862 mTempRubberBand->removeLastPoint();
863 mTempRubberBand->movePoint( lastPoint );
868 vertexToRemove.
part = 0;
869 vertexToRemove.
ring = 0;
881 const int curvesBefore = mCaptureCurve.
nCurves();
882 const bool lastCurveIsLineString = qgsgeometry_cast< QgsLineString * >( mCaptureCurve.
curveAt( curvesBefore - 1 ) );
884 const int pointsCountBefore = mCaptureCurve.
numPoints();
886 int pointsCountAfter = mCaptureCurve.
numPoints();
887 for ( ; pointsCountAfter < pointsCountBefore; pointsCountAfter++ )
888 if ( !mSnappingMatches.empty() )
889 mSnappingMatches.removeLast();
895 if ( mCaptureCurve.
nCurves() < curvesBefore && lastCurveIsLineString )
896 mIgnoreSubsequentAutoRepeatUndo =
true;
899 updateExtraSnapLayer();
909 mTempRubberBand->addPoint( mCaptureLastPoint );
910 mTempRubberBand->movePoint( lastPoint );
923 if ( e->isAccepted() )
934 if ( e->key() == Qt::Key_Backspace || e->key() == Qt::Key_Delete )
938 if ( !e->isAutoRepeat() )
940 mCurrentShapeMapTool->
undo();
945 undo( e->isAutoRepeat() );
951 else if ( e->key() == Qt::Key_Escape )
953 if ( mCurrentShapeMapTool )
954 mCurrentShapeMapTool->
clean();
979 qDeleteAll( mGeomErrorMarkers );
980 mGeomErrorMarkers.clear();
989 mCaptureCurve.
clear();
990 updateExtraSnapLayer();
991 mSnappingMatches.clear();
993 lCurrentVectorLayer->triggerRepaint();
998 mTempRubberBand.
reset();
1005 mCurrentShapeMapTool->
clean();
1012 mCaptureCurve.
close();
1013 updateExtraSnapLayer();
1016 void QgsMapToolCapture::validateGeometry()
1025 mValidator->deleteLater();
1026 mValidator =
nullptr;
1029 mGeomErrors.clear();
1030 while ( !mGeomErrorMarkers.isEmpty() )
1032 delete mGeomErrorMarkers.takeFirst();
1037 switch ( mCaptureMode )
1051 exteriorRing->
close();
1063 method = Qgis::GeometryValidationEngine::Geos;
1066 mValidator->start();
1080 vm->
setCenter(
mCanvas->mapSettings().layerToMapCoordinates( vlayer, e.where() ) );
1083 vm->setToolTip( e.what() );
1085 vm->setZValue( vm->zValue() + 1 );
1086 mGeomErrorMarkers << vm;
1097 QVector<QgsPointXY> pointsXY;
1106 mCaptureCurve.
points( pts );
1113 mCaptureCurve.
clear();
1115 updateExtraSnapLayer();
1116 mSnappingMatches.clear();
1117 for (
int i = 0; i < line->
length(); ++i )
1125 mCaptureCurve.
clear();
1127 updateExtraSnapLayer();
1128 mSnappingMatches.clear();
1129 for (
int i = 0; i < line->
length(); ++i )
1186 if ( match.
layer() )
1204 void QgsMapToolCapture::updateExtraSnapLayer()
1206 if ( !mExtraSnapLayer )
1209 if (
canvas()->snappingUtils()->config().selfSnapping() &&
layer() && mCaptureCurve.
numPoints() >= 2 )
1217 qgsgeometry_cast<QgsCompoundCurve *>( geom.
get() )->close();
1234 if ( e->button() != Qt::LeftButton )
1238 bool isMatchPointZ =
false;
1239 bool isMatchPointM =
false;
1250 if ( isMatchPointM && isMatchPointZ )
1252 geomType = QgsWkbTypes::Type::PointZM;
1254 else if ( isMatchPointM )
1256 geomType = QgsWkbTypes::Type::PointM;
1258 else if ( isMatchPointZ )
1260 geomType = QgsWkbTypes::Type::PointZ;
1262 savePoint =
QgsPoint( geomType, fetchPoint.
x(), fetchPoint.
y(), fetchPoint.
z(), fetchPoint.
m() );
1268 savePoint =
QgsPoint( point.
x(), point.
y(), fetchPoint.
z(), fetchPoint.
m() );
1274 emit
messageEmitted( tr(
"Cannot transform the point to the layer's coordinate system" ), Qgis::MessageLevel::Warning );
1278 QgsGeometry g( std::make_unique<QgsPoint>( savePoint ) );
1283 geometryCaptured( g );
1284 pointCaptured( savePoint );
1295 bool digitizingFinished =
false;
1299 if ( !mCurrentShapeMapTool )
1301 emit
messageEmitted( tr(
"Select an option from the Shape Digitizing Toolbar in order to capture shapes" ), Qgis::MessageLevel::Warning );
1306 if ( !mTempRubberBand )
1308 mTempRubberBand.
reset( createCurveRubberBand() );
1309 mTempRubberBand->setStringType( mLineDigitizingType );
1314 if ( digitizingFinished )
1315 mCurrentShapeMapTool->
clean();
1321 if ( e->button() == Qt::LeftButton )
1327 emit
messageEmitted( tr(
"Cannot transform the point to the layers coordinate system" ), Qgis::MessageLevel::Warning );
1333 else if ( e->button() == Qt::RightButton )
1357 digitizingFinished =
true;
1361 if ( digitizingFinished )
1369 geometryCaptured( g );
1370 lineCaptured( curveToAdd );
1377 geometryCaptured( g );
1378 polygonCaptured( poly );
Abstract base class for curved geometry type.
QgsFeatureIterator getFeatures(const QgsFeatureRequest &request=QgsFeatureRequest()) const FINAL
Queries the layer for features specified in request.
bool loadDefaultStyle
Set to true if the default layer style should be loaded.
QgsCoordinateReferenceSystem crs
void currentLayerChanged(QgsMapLayer *layer)
Emitted when the current layer is changed.
void reset(T *p=nullptr)
Will reset the managed pointer to p.
void reset(T *p=nullptr)
Will reset the managed pointer to p.
Q_INVOKABLE QgsWkbTypes::Type wkbType() const FINAL
Returns the WKBType or WKBUnknown in case of error.
bool hasMiddleSegment() const
Returns true if the Match is the middle of a segment.
QgsVectorDataProvider * dataProvider() FINAL
Returns the layer's data provider, it may be nullptr.
QgsPointXY mapPoint() const
mapPoint returns the point in coordinates
double length() const override SIP_HOLDGIL
Returns the planar, 2-dimensional length of the geometry.
void setIconType(int iconType)
QVector< QgsPointXY > findShortestPath(const QgsPointXY &p1, const QgsPointXY &p2, PathError *error=nullptr)
Given two points, find the shortest path and return points on the way.
Point geometry type, with support for z-dimension and m-values.
void setM(double m) SIP_HOLDGIL
Sets the point's m-value.
#define QgsDebugMsgLevel(str, level)
bool addZValue(double zValue=0) override
Adds a z-dimension to the geometry, initialized to a preset value.
bool isEmpty() const override SIP_HOLDGIL
Returns true if the geometry is empty.
bool init()
Build the internal data structures.
A class for drawing transient features (e.g. digitizing lines) on the map.
virtual void setExteriorRing(QgsCurve *ring)
Sets the exterior ring of the polygon.
int nCurves() const SIP_HOLDGIL
Returns the number of curves in the geometry.
const QgsCoordinateReferenceSystem & crs
static QCursor getThemeCursor(Cursor cursor)
Helper to get a theme cursor.
static Type flatType(Type type) SIP_HOLDGIL
Returns the flat type for a WKB type.
Curve polygon geometry type.
void setExteriorRing(QgsCurve *ring) override
Sets the exterior ring of the polygon.
Map canvas is a class for displaying all GIS data types on a canvas.
const QgsPointXY * getPoint(int i, int j=0, int ringIndex=0) const
Returns a vertex.
static QgsProject * instance()
Returns the QgsProject singleton instance.
QgsLineString * curveToLine(double tolerance=M_PI_2/90, SegmentationToleranceType toleranceType=MaximumAngle) const override
Returns a new line string geometry corresponding to a segmentized approximation of the curve.
void close()
Appends first point if not already closed.
static QgsPoint closestPoint(const QgsAbstractGeometry &geometry, const QgsPoint &point)
Returns the nearest point on a segment of a geometry for the specified point.
Type
The WKB type describes the number of dimensions a geometry has.
static const QgsSettingsEntryDouble settingsDigitizingConvertToCurveAngleTolerance
Settings entry digitizing convert to curve angle tolerance.
Q_INVOKABLE bool startEditing()
Makes the layer editable.
int numPoints() const override SIP_HOLDGIL
Returns the number of points in the curve.
static const QgsSettingsEntryInteger settingsDigitizingStreamTolerance
Settings entry digitizing stream tolerance.
QgsPointXY point() const
for vertex / edge match coords depending on what class returns it (geom.cache: layer coords,...
Line string geometry type, with support for z-dimension and m-values.
void movePoint(const QgsPointXY &p, int geometryIndex=0, int ringIndex=0)
Moves the rubber band point specified by index.
void setCrs(const QgsCoordinateReferenceSystem &srs, bool emitSignal=true)
Sets layer's spatial reference system.
GeometryValidationEngine
Available engines for validating geometries.
bool hasVertex() const
Returns true if the Match is a vertex.
Class that shows snapping marker on map canvas for the current snapping match.
const QgsCurve * curveAt(int i) const SIP_HOLDGIL
Returns the curve at the specified index.
QAction * actionEnableTracing() const
Access to action that user may use to toggle tracing on/off. May be nullptr if no action was associat...
void reset(QgsWkbTypes::GeometryType geometryType=QgsWkbTypes::LineGeometry)
Clears all the geometries in this rubberband.
QgsFeatureRequest & setFilterFid(QgsFeatureId fid)
Sets the feature ID that should be fetched.
QgsPoint startPoint() const override SIP_HOLDGIL
Returns the starting point of the curve.
bool dropMValue() override
Drops any measure values which exist in the geometry.
virtual QgsPoint vertexAt(QgsVertexId id) const =0
Returns the point corresponding to a specified vertex id.
bool isMeasure() const SIP_HOLDGIL
Returns true if the geometry contains m values.
static const QgsSettingsEntryDouble settingsDigitizingConvertToCurveDistanceTolerance
Settings entry digitizing convert to curve distance tolerance.
T * release()
Clears the pointer and returns it.
A class for marking vertices of features using e.g. circles or 'x'.
bool changeGeometry(QgsFeatureId fid, QgsGeometry &geometry, bool skipDefaultValue=false)
Changes a feature's geometry within the layer's edit buffer (but does not immediately commit the chan...
void setParentOwner(QObject *parent)
Sets the parent object.
int vertexIndex() const
for vertex / edge match (first vertex of the edge)
bool hasEdge() const
Returns true if the Match is an edge.
This class wraps a request for features to a vector layer (or directly its vector data provider).
virtual Q_INVOKABLE QgsVectorDataProvider::Capabilities capabilities() const
Returns flags containing the supported capabilities.
QgsPointLocator::Match mapPointMatch() const
Returns the matching data from the most recently snapped point.
Custom exception class for Coordinate Reference System related exceptions.
void addGeometry(const QgsGeometry &geometry, QgsMapLayer *layer, bool doUpdate=true)
Adds the geometry of an existing feature to a rubberband This is useful for multi feature highlightin...
bool addMValue(double mValue=0) override
Adds a measure to the geometry, initialized to a preset value.
QgsWkbTypes::Type wkbType() const SIP_HOLDGIL
Returns the WKB type of the geometry.
virtual QgsPoint endPoint() const =0
Returns the end point of the curve.
static const QgsSettingsEntryInteger settingsDigitizingValidateGeometries
Settings entry digitizing validate geometries.
QgsPoint endPoint() const override SIP_HOLDGIL
Returns the end point of the curve.
@ CircularString
Capture in circular strings.
void addVertex(const QgsPoint &pt)
Adds a vertex to the end of the geometry.
bool hasLineEndpoint() const
Returns true if the Match is a line endpoint (start or end vertex).
Extension of QgsTracer that provides extra functionality:
@ ErrTooManyFeatures
Max feature count threshold was reached while reading features.
bool dropZValue() override
Drops any z-dimensions which exist in the geometry.
void setPenWidth(int width)
void points(QgsPointSequence &pts) const override
Returns a list of points within the curve.
static bool hasM(Type type) SIP_HOLDGIL
Tests whether a WKB type contains m values.
void setCenter(const QgsPointXY &point)
Sets the center point of the marker, in map coordinates.
QAction * actionEnableSnapping() const
Access to action that user may use to toggle snapping on/off.
void setColor(const QColor &color)
Sets the stroke color for the marker.
#define BUILTIN_UNREACHABLE
int numberOfVertices() const
Returns count of vertices in all lists of mPoint.
QgsVectorLayer * layer() const
The vector layer where the snap occurred.
const QgsAbstractGeometry * constGet() const SIP_HOLDGIL
Returns a non-modifiable (const) reference to the underlying abstract geometry primitive.
static QgsMapCanvasTracer * tracerForCanvas(QgsMapCanvas *canvas)
Retrieve instance of this class associated with given canvas (if any).
void clear() override
Clears the geometry, ie reset it to a null geometry.
bool is3D() const SIP_HOLDGIL
Returns true if the geometry is 3D and contains a z-value.
QgsPoint vertexAt(int atVertex) const
Returns coordinates of a vertex.
A class to represent a 2D point.
static const QgsSettingsEntryDouble settingsDigitizingLineColorAlphaScale
Settings entry digitizing line color alpha scale.
QgsGeometry convertToCurves(double distanceTolerance=1e-8, double angleTolerance=1e-8) const
Attempts to convert a non-curved geometry into a curved geometry type (e.g.
bool moveVertex(QgsVertexId position, const QgsPoint &newPos) override
Moves a vertex within the geometry.
Setting options for loading vector layers.
QgsAbstractGeometry * get()
Returns a modifiable (non-const) reference to the underlying abstract geometry primitive.
A QgsMapMouseEvent is the result of a user interaction with the mouse on a QgsMapCanvas....
QgsFeatureId featureId() const
The id of the feature to which the snapped geometry belongs.
QgsCompoundCurve * clone() const override
Clones the geometry by performing a deep copy.
static void convertPointList(const QVector< QgsPointXY > &input, QgsPointSequence &output)
Upgrades a point list from QgsPointXY to QgsPoint.
bool nextFeature(QgsFeature &f)
int vertexCount(int part=0, int ring=0) const override
Returns the number of vertices of which this geometry is built.
QVector< QgsPoint > QgsPointSequence
As part of the API refactoring and improvements which landed in the Processing API was substantially reworked from the x version This was done in order to allow much of the underlying Processing framework to be ported into c
A geometry is the spatial representation of a feature.
void close()
Closes the line string by appending the first point to the end of the line, if it is not already clos...
@ StraightSegments
Default capture mode - capture occurs with straight line segments.
Represents a vector layer which manages a vector based data sets.
Base class for all map layer types. This is the base class for all map layer types (vector,...
void addCurve(QgsCurve *c, bool extendPrevious=false)
Adds a curve to the geometry (takes ownership).
Utility class for identifying a unique vertex within a geometry.
void reportError(PathError err, bool addingVertex)
Report a path finding error to the user.
bool convertTo(QgsWkbTypes::Type type) override
Converts the geometry to a specified type.
static bool hasZ(Type type) SIP_HOLDGIL
Tests whether a WKB type contains the z-dimension.
static const QgsSettingsEntryBool settingsDigitizingConvertToCurve
Settings entry digitizing convert to curve.
bool vertexIdFromVertexNr(int number, QgsVertexId &id) const
Calculates the vertex ID from a vertex number.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
bool isEmpty() const override SIP_HOLDGIL
Returns true if the geometry is empty.
QgsMapLayer * currentLayer()
returns current layer (set by legend widget)
QgsFeature getFeature(QgsFeatureId fid) const
Queries the layer for the feature with the given id.
QgsCurve * segmentize(double tolerance=M_PI_2/90, SegmentationToleranceType toleranceType=MaximumAngle) const override
Returns a geometry without curves.
bool deleteVertex(QgsVertexId position) override
Deletes a vertex within the geometry.
CaptureTechnique
Capture technique.
PathError
Possible errors that may happen when calling findShortestPath()
void setZ(double z) SIP_HOLDGIL
Sets the point's z-coordinate.
bool isPointSnapped(const QgsPointXY &pt)
Find out whether the point is snapped to a vertex or edge (i.e. it can be used for tracing start/stop...
void snappingConfigChanged(const QgsSnappingConfig &config)
Emitted whenever the configuration for snapping has changed.
Q_INVOKABLE QgsWkbTypes::GeometryType geometryType() const
Returns point, line or polygon.
bool addFeature(QgsFeature &feature, QgsFeatureSink::Flags flags=QgsFeatureSink::Flags()) FINAL
Adds a single feature to the sink.
@ Streaming
Streaming points digitizing mode (points are automatically added as the mouse cursor moves).
bool skipCrsValidation
Controls whether the layer is allowed to have an invalid/unknown CRS.
void errorFound(const QgsGeometry::Error &error)
Sent when an error has been found during the validation process.
QgsWkbTypes::Type wkbType() const SIP_HOLDGIL
Returns type of the geometry as a WKB type (point / linestring / polygon etc.)
bool isSnapped() const
Returns true if there is a snapped point cached.
void removeCurve(int i)
Removes a curve from the geometry.
T value(const QString &dynamicKeyPart=QString()) const
Returns settings value.