Class: QgsMapToolEdit¶
-
class
qgis.gui.
QgsMapToolEdit
¶ Bases:
QgsMapTool
Base class for map tools that edit vector geometry
Methods
Adds vertices to other features to keep topology up to date, e.g.
- param geometryType
Creates a rubber band with the color/line width from the QGIS settings.
Returns the current vector layer of the map canvas or 0
Returns default Z value Use for set Z coordinate to new vertex for 2.5d geometries
Returns fill color for rubber bands (from global settings)
Returns stroke color for rubber bands (from global settings)
Returns stroke width for rubber bands (from global settings)
- rtype
QgsMapTool.Flags
Display a timed message bar noting the active vector layer is not editable.
Display a timed message bar noting the active layer is not vector.
-
addTopologicalPoints
(self, geom: Iterable[QgsPointXY]) → int¶ Adds vertices to other features to keep topology up to date, e.g. to neighbouring polygons.
- Parameters
geom (Iterable[QgsPointXY]) – list of points (in layer coordinate system)
- Return type
int
- Returns
0 in case of success
-
childEvent
()¶
-
connectNotify
()¶
-
createGeometryRubberBand
(self, geometryType: QgsWkbTypes.GeometryType = QgsWkbTypes.LineGeometry, alternativeBand: bool = False) → QgsGeometryRubberBand¶ - Parameters
geometryType (QgsWkbTypes.GeometryType = QgsWkbTypes.LineGeometry) –
alternativeBand (bool = False) –
- Return type
-
createRubberBand
(self, geometryType: QgsWkbTypes.GeometryType = QgsWkbTypes.LineGeometry, alternativeBand: bool = False) → QgsRubberBand¶ Creates a rubber band with the color/line width from the QGIS settings. The caller takes ownership of the returned object
- Parameters
geometryType (QgsWkbTypes.GeometryType = QgsWkbTypes.LineGeometry) –
alternativeBand (bool = False) – if true, rubber band will be set with more transparency and a dash pattern. default is false.
- Return type
-
currentVectorLayer
(self) → QgsVectorLayer¶ Returns the current vector layer of the map canvas or 0
- Return type
-
customEvent
()¶
-
defaultZValue
(self) → float¶ Returns default Z value Use for set Z coordinate to new vertex for 2.5d geometries
- Return type
float
-
digitizingFillColor
() → QColor¶ Returns fill color for rubber bands (from global settings)
- Return type
QColor
-
digitizingStrokeColor
() → QColor¶ Returns stroke color for rubber bands (from global settings)
- Return type
QColor
-
digitizingStrokeWidth
() → int¶ Returns stroke width for rubber bands (from global settings)
- Return type
int
-
disconnectNotify
()¶
-
flags
(self) → QgsMapTool.Flags¶ - Return type
-
isSignalConnected
()¶
-
notifyNotEditableLayer
(self)¶ Display a timed message bar noting the active vector layer is not editable.
-
notifyNotVectorLayer
(self)¶ Display a timed message bar noting the active layer is not vector.
-
receivers
()¶
-
sender
()¶
-
senderSignalIndex
()¶
-
timerEvent
()¶
-
toCanvasCoordinates
()¶
-
toLayerCoordinates
()¶
-
toMapCoordinates
()¶
-
toMapCoordinatesV2
()¶