Subgroup: Map
Class: QgsMapToolCapture¶
-
class
qgis.gui.
QgsMapToolCapture
(canvas: QgsMapCanvas, cadDockWidget: QgsAdvancedDigitizingDockWidget, mode: QgsMapToolCapture.CaptureMode)¶ Bases:
qgis._gui.QgsMapToolAdvancedDigitizing
constructor
Methods
action
Return associated action with map tool or NULL if no action is associated activate
addCurve
Adds a whole curve (e.g. addTopologicalPoints
addVertex
addVertex(self, mapPoint: QgsPointXY, match: QgsPointLocator.Match) -> int blockSignals
button
Return associated button with map tool or NULL if no button is associated cadCanvasMoveEvent
cadCanvasPressEvent
Override this method when subclassing this class. cadCanvasReleaseEvent
Override this method when subclassing this class. cadDockWidget
canvas
returns pointer to the tool’s map canvas canvasDoubleClickEvent
Mouse double-click event for overriding. canvasMoveEvent
Catch the mouse move event, filters it, transforms it to map coordinates and send it to virtual method canvasPressEvent
Catch the mouse press event, filters it, transforms it to map coordinates and send it to virtual method canvasReleaseEvent
Catch the mouse release event, filters it, transforms it to map coordinates and send it to virtual method captureCurve
Get the capture curve childEvent
children
clean
convenient method to clean members clearCurve
Clear capture curve. closePolygon
Close an open polygon connectNotify
createGeometryRubberBand
createRubberBand
currentVectorLayer
customEvent
deactivate
defaultZValue
Return default Z value deleteLater
deleteTempRubberBand
Clean a temporary rubberband digitizingFillColor
digitizingStrokeColor
digitizingStrokeWidth
disconnect
disconnectNotify
dumpObjectInfo
dumpObjectTree
dynamicPropertyNames
event
eventFilter
fetchLayerPoint
findChild
findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject findChildren
findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] flags
gestureEvent
gesture event for overriding. Default implementation does nothing. inherits
installEventFilter
isAdvancedDigitizingAllowed
Returns whether functionality of advanced digitizing dock widget is currently allowed. isAutoSnapEnabled
Returns whether mouse events (press/move/release) should automatically try to snap mouse position (according to the snapping configuration of map canvas) before passing the mouse coordinates to the tool. isCapturing
Are we currently capturing? isSignalConnected
isWidgetType
isWindowType
keyPressEvent
Intercept key events like Esc or Del to delete the last point keyReleaseEvent
Key event for overriding. killTimer
metaObject
mode
The capture mode moveToThread
nextPoint
nextPoint(self, p: QPoint, layerPoint: QgsPoint, mapPoint: QgsPoint) -> int notifyNotEditableLayer
notifyNotVectorLayer
objectName
parent
points
List of digitized points property
pyqtConfigure
Each keyword argument is either the name of a Qt property or a Qt signal. receivers
removeEventFilter
searchRadiusMM
Get search radius in mm. searchRadiusMU
Get search radius in map units for given context. sender
senderSignalIndex
setAction
Use this to associate a QAction to this maptool. setAdvancedDigitizingAllowed
setAutoSnapEnabled
setButton
Use this to associate a button to this maptool. setCursor
Set a user defined cursor setObjectName
setParent
setPoints
Set the points on which to work setProperty
signalsBlocked
size
Number of points digitized snappingMatches
Return a list of matches for each point on the captureCurve. startCapturing
Start capturing startTimer
stopCapturing
Stop capturing thread
timerEvent
toCanvasCoordinates
toLayerCoordinates
toMapCoordinates
toMapCoordinatesV2
toolName
Emit map tool changed with the old tool tr
undo
Removes the last vertex from mRubberBand and mCaptureList wheelEvent
Mouse wheel event for overriding. Attributes
AllowZoomRect
CaptureLine
CaptureNone
CapturePoint
CapturePolygon
EditTool
Transient
activated
signal emitted once the map tool is activated [signal] deactivated
signal emitted once the map tool is deactivated [signal] destroyed
destroyed(self, QObject = None) [signal] messageDiscarded
emit signal to clear previous message [signal] messageEmitted
emit a message [signal] objectNameChanged
objectNameChanged(self, str) [signal] staticMetaObject
-
CaptureLine
= 2¶
-
class
CaptureMode
¶ Bases:
int
-
CaptureNone
= 0¶
-
CapturePoint
= 1¶
-
CapturePolygon
= 3¶
-
activate
(self)¶
-
addCurve
(self, c: QgsCurve) → int¶ Adds a whole curve (e.g. circularstring) to the captured geometry. Curve must be in map CRS
-
addTopologicalPoints
()¶
-
addVertex
(self, point: QgsPointXY) → int¶ addVertex(self, mapPoint: QgsPointXY, match: QgsPointLocator.Match) -> int Variant to supply more information in the case of snapping
Parameters: - mapPoint – The vertex to add in map coordinates
- match – Data about the snapping match. Can be an invalid match, if point not snapped.
New in version 2.14.
-
cadCanvasMoveEvent
(self, e: QgsMapMouseEvent)¶
-
captureCurve
(self) → QgsCompoundCurve¶ Get the capture curve
Returns: Capture curve
-
childEvent
()¶
-
clean
(self)¶ convenient method to clean members
-
clearCurve
(self)¶ Clear capture curve.
New in version 3.0.
-
closePolygon
(self)¶ Close an open polygon
-
connectNotify
()¶
-
createGeometryRubberBand
()¶
-
createRubberBand
()¶
-
currentVectorLayer
()¶
-
customEvent
()¶
-
deactivate
(self)¶
-
deleteTempRubberBand
(self)¶ Clean a temporary rubberband
-
digitizingFillColor
()¶
-
digitizingStrokeColor
()¶
-
digitizingStrokeWidth
()¶
-
disconnectNotify
()¶
-
eventFilter
(self, obj: QObject, e: QEvent) → bool¶
-
fetchLayerPoint
(self, match: QgsPointLocator.Match, layerPoint: QgsPoint) → int¶
-
isCapturing
(self) → bool¶ Are we currently capturing?
Returns: Is the tool in capture mode?
-
isSignalConnected
()¶
-
keyPressEvent
(self, e: QKeyEvent)¶ Intercept key events like Esc or Del to delete the last point
Parameters: e – key event
-
mode
(self) → QgsMapToolCapture.CaptureMode¶ The capture mode
Returns: Capture mode
-
nextPoint
(self, mapPoint: QgsPoint, layerPoint: QgsPoint) → int¶ nextPoint(self, p: QPoint, layerPoint: QgsPoint, mapPoint: QgsPoint) -> int
-
notifyNotEditableLayer
()¶
-
notifyNotVectorLayer
()¶
-
points
(self) → List[QgsPointXY]¶ List of digitized points
Returns: List of points
-
receivers
()¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setAdvancedDigitizingAllowed
()¶
-
setAutoSnapEnabled
()¶
-
setPoints
(self, pointList: Iterable[QgsPointXY])¶ Set the points on which to work
Parameters: pointList – A list of points
-
size
(self) → int¶ Number of points digitized
Returns: Number of points
-
snappingMatches
(self) → List[QgsPointLocator.Match]¶ Return a list of matches for each point on the captureCurve.
New in version 3.0.
-
startCapturing
(self)¶ Start capturing
-
stopCapturing
(self)¶ Stop capturing
-
timerEvent
()¶
-
toCanvasCoordinates
()¶
-
toLayerCoordinates
()¶
-
toMapCoordinates
()¶
-
toMapCoordinatesV2
()¶
-
undo
(self)¶ Removes the last vertex from mRubberBand and mCaptureList
-