18#include "moc_qgsmaptoolcapturelayergeometry.cpp"
24void QgsMapToolCaptureLayerGeometry::geometryCaptured(
const QgsGeometry &geometry )
42 if ( !datasetIsCurved || !providerSupportsCurvedSegments )
45 QList<QgsVectorLayer *> avoidIntersectionsLayers;
50 avoidIntersectionsLayers.append( vlayer );
58 if ( avoidIntersectionsLayers.size() > 0 )
75 layerGeometryCaptured( g );
82 layerPointCaptured( *qgsgeometry_cast<const QgsPoint *>( g.constGet() ) );
85 layerLineCaptured( qgsgeometry_cast<const QgsCurve *>( g.constGet() ) );
88 layerPolygonCaptured( qgsgeometry_cast<const QgsCurvePolygon *>( g.constGet() ) );
@ CircularGeometries
Supports circular geometry types (circularstring, compoundcurve, curvepolygon)
GeometryOperationResult
Success or failure of a geometry operation.
@ InvalidBaseGeometry
The base geometry on which the operation is done is invalid or empty.
@ Warning
Warning message.
@ Critical
Critical/error message.
@ AvoidIntersectionsLayers
Overlap with features from a specified list of layers when digitizing new features not allowed.
@ AllowIntersections
Overlap with any feature allowed when digitizing new features.
@ AvoidIntersectionsCurrentLayer
Overlap with features from the active layer when digitizing new features not allowed.
A geometry is the spatial representation of a feature.
static QgsProject * instance()
Returns the QgsProject singleton instance.
QList< QgsVectorLayer * > avoidIntersectionsLayers
virtual Q_INVOKABLE Qgis::VectorProviderCapabilities capabilities() const
Returns flags containing the supported capabilities.
Represents a vector layer which manages a vector based data sets.
Q_INVOKABLE Qgis::WkbType wkbType() const FINAL
Returns the WKBType or WKBUnknown in case of error.
QgsVectorDataProvider * dataProvider() FINAL
Returns the layer's data provider, it may be nullptr.
static bool isCurvedType(Qgis::WkbType type)
Returns true if the WKB type is a curved type or can contain curved geometries.