Class: QgsAdvancedDigitizingDockWidget

class qgis.gui.QgsAdvancedDigitizingDockWidget

Bases: QgsDockWidget

The QgsAdvancedDigitizingDockWidget class is a dockable widget used to handle the CAD tools on top of a selection of map tools. It handles both the UI and the constraints. Constraints are applied by implementing filters called from QgsMapToolAdvancedDigitizing.

QgsAdvancedDigitizingDockWidget(canvas: QgsMapCanvas, parent: QWidget = None) Create an advanced digitizing dock widget

Parameters:
AbsoluteAngle = 1
class CadCapacities
class CadCapacities(Union[QgsAdvancedDigitizingDockWidget.CadCapacities, QgsAdvancedDigitizingDockWidget.CadCapacity])
class CadCapacities(QgsAdvancedDigitizingDockWidget.CadCapacities)

Bases: sip.wrapper

baseClass

alias of QgsAdvancedDigitizingDockWidget

class CadCapacity

Bases: int

class CadConstraint

Bases: sip.wrapper

The CadConstraint is a class for all basic constraints (angle/distance/x/y). It contains all values (locked, value, relative) and pointers to corresponding widgets.

Note

Relative is not mandatory since it is not used for distance.

QgsAdvancedDigitizingDockWidget.CadConstraint(lineEdit: QLineEdit, lockerButton: QToolButton, relativeButton: QToolButton = None, repeatingLockButton: QToolButton = None) Constructor for CadConstraint.

Parameters:
  • lineEdit – associated line edit for constraint value

  • lockerButton – associated button for locking constraint

  • relativeButton – optional button for toggling relative constraint mode

  • repeatingLockButton – optional button for toggling repeating lock mode

QgsAdvancedDigitizingDockWidget.CadConstraint(QgsAdvancedDigitizingDockWidget.CadConstraint)

HardLock = 2
class LockMode

Bases: int

NoLock = 0
SoftLock = 1
cadConstraintType(self) Qgis.CadConstraintType

Returns the constraint type

New in version 3.32.

Return type:

Qgis.CadConstraintType

displayValue(self) str

Returns a localized formatted string representation of the value.

New in version 3.32.

Return type:

str

isLocked(self) bool

Is any kind of lock mode enabled

Return type:

bool

isRepeatingLock(self) bool

Returns True if a repeating lock is set for the constraint. Repeating locks are not automatically cleared after a new point is added.

Return type:

bool

lineEdit(self) QLineEdit

The line edit that manages the value of the constraint

Return type:

QLineEdit

lockMode(self) QgsAdvancedDigitizingDockWidget.CadConstraint.LockMode

The current lock mode of this constraint

Return type:

QgsAdvancedDigitizingDockWidget.CadConstraint.LockMode

Returns:

Lock mode

precision(self) int

Returns the numeric precision (decimal places) to show in the associated widget.

See also

setPrecision()

New in version 3.22.

Return type:

int

relative(self) bool

Is the constraint in relative mode

Return type:

bool

removeSuffix(text: str, constraintType: Qgis.CadConstraintType) str

Removes unit suffix from the constraint text.

New in version 3.34.

Parameters:
Return type:

str

setCadConstraintType(self, constraintType: Qgis.CadConstraintType)

Sets the constraint type to constraintType

New in version 3.32.

Parameters:

constraintType (Qgis.CadConstraintType) –

setLockMode(self, mode: QgsAdvancedDigitizingDockWidget.CadConstraint.LockMode)

Set the lock mode

Parameters:

mode (QgsAdvancedDigitizingDockWidget.CadConstraint.LockMode) –

setMapCanvas(self, mapCanvas: QgsMapCanvas)

Sets the map canvas to mapCanvas

New in version 3.32.

Parameters:

mapCanvas (QgsMapCanvas) –

setPrecision(self, precision: int)

Sets the numeric precision (decimal places) to show in the associated widget.

See also

precision()

New in version 3.22.

Parameters:

precision (int) –

setRelative(self, relative: bool)

Set if the constraint should be treated relative

Parameters:

relative (bool) –

setRepeatingLock(self, repeating: bool)

Sets whether a repeating lock is set for the constraint. Repeating locks are not automatically cleared after a new point is added.

Parameters:

repeating (bool) – set to True to set the lock to repeat automatically

setValue(self, value: float, updateWidget: bool = True)

Set the value of the constraint

Parameters:
  • value (float) – new value for constraint

  • updateWidget (bool = True) – set to False to prevent automatically updating the associated widget’s value

toggleLocked(self)

Toggle lock mode

toggleRelative(self)

Toggle relative mode

value(self) float

The value of the constraint

Return type:

float

Distance = 8
RelativeAngle = 2
RelativeCoordinates = 4
ReturnPressed = 0
class WidgetSetMode

Bases: int

actionEvent(self, QActionEvent)
addPoint(self, point: QgsPointXY)

Adds point to the CAD point list

Parameters:

point (QgsPointXY) –

alignToSegment(self, e: QgsMapMouseEvent, lockMode: QgsAdvancedDigitizingDockWidget.CadConstraint.LockMode = QgsAdvancedDigitizingDockWidget.CadConstraint.HardLock) bool

align to segment for between line constraint. If between line constraints are used, this will determine the angle to be locked depending on the snapped segment.

Parameters:
  • e (QgsMapMouseEvent) –

  • lockMode (QgsAdvancedDigitizingDockWidget.CadConstraint.LockMode = QgsAdvancedDigitizingDockWidget.CadConstraint.HardLock) –

Return type:

bool

applyConstraints(self, e: QgsMapMouseEvent) bool

apply the CAD constraints. The will modify the position of the map event in map coordinates by applying the CAD constraints.

Return type:

bool

Returns:

False if no solution was found (invalid constraints)

Parameters:

e (QgsMapMouseEvent) –

betweenLineConstraint(self) Qgis.BetweenLineConstraint

Returns the between line constraints which are used to place perpendicular/parallel segments to snapped segments on the canvas

Return type:

Qgis.BetweenLineConstraint

cadEnabled(self) bool

determines if CAD tools are enabled or if map tools behaves “nomally”

Return type:

bool

cadEnabledChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

canvasKeyPressEventFilter(self, e: QKeyEvent) bool

Filter key events to e.g. toggle construction mode or adapt constraints

Parameters:

e (QKeyEvent) – A mouse event (may be modified)

Return type:

bool

Returns:

If the event is hidden (construction mode hides events from the maptool)

capacities(self) QgsAdvancedDigitizingDockWidget.CadCapacities

Returns the capacities

New in version 3.26.

Return type:

QgsAdvancedDigitizingDockWidget.CadCapacities

changeEvent(self, QEvent)
childEvent(self, QChildEvent)
clear(self)

Clear any cached previous clicks and helper lines

clearLockedSnapVertices(self, force: bool = True)

Removes all points from the locked snap vertex list

Parameters:

force (bool = True) – Clears the list even if the constraints that use it are still locked.

New in version 3.26.

clearPoints(self)

Removes all points from the CAD point list

closeEvent(self, QCloseEvent)
commonAngleConstraint(self) bool

Returns True if a constraint on a common angle is active

Return type:

bool

connectNotify(self, QMetaMethod)
constraintAngle(self) QgsAdvancedDigitizingDockWidget.CadConstraint

Returns the CadConstraint on the angle

Return type:

QgsAdvancedDigitizingDockWidget.CadConstraint

constraintDistance(self) QgsAdvancedDigitizingDockWidget.CadConstraint

Returns the CadConstraint on the distance

Return type:

QgsAdvancedDigitizingDockWidget.CadConstraint

constraintLineExtension(self) QgsAdvancedDigitizingDockWidget.CadConstraint

Returns the CadConstraint

Return type:

QgsAdvancedDigitizingDockWidget.CadConstraint

constraintM(self) QgsAdvancedDigitizingDockWidget.CadConstraint

Returns the CadConstraint on the M coordinate

New in version 3.22.

Return type:

QgsAdvancedDigitizingDockWidget.CadConstraint

constraintX(self) QgsAdvancedDigitizingDockWidget.CadConstraint

Returns the CadConstraint on the X coordinate

Return type:

QgsAdvancedDigitizingDockWidget.CadConstraint

constraintXyVertex(self) QgsAdvancedDigitizingDockWidget.CadConstraint

Returns the CadConstraint

Return type:

QgsAdvancedDigitizingDockWidget.CadConstraint

constraintY(self) QgsAdvancedDigitizingDockWidget.CadConstraint

Returns the CadConstraint on the Y coordinate

Return type:

QgsAdvancedDigitizingDockWidget.CadConstraint

constraintZ(self) QgsAdvancedDigitizingDockWidget.CadConstraint

Returns the CadConstraint on the Z coordinate

New in version 3.22.

Return type:

QgsAdvancedDigitizingDockWidget.CadConstraint

constructionMode(self) bool

construction mode is used to draw intermediate points. These points won’t be given any further (i.e. to the map tools)

Return type:

bool

contextMenuEvent(self, QContextMenuEvent)
create(self, window: PyQt5.sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)
currentPoint(self) Tuple[QgsPointXY, bool]

The last point. Helper for the CAD point list. The CAD point list is the list of points currently digitized. It contains both “normal” points and intermediate points (construction mode).

Deprecated since version QGIS: 3.22. Use currentPointV2() instead.

Return type:

Tuple[QgsPointXY, bool]

currentPointLayerCoordinates(self, layer: QgsMapLayer) QgsPoint

Returns the last CAD point, in a map layer’s coordinates.

New in version 3.22.

Parameters:

layer (QgsMapLayer) –

Return type:

QgsPoint

currentPointV2(self) Tuple[QgsPoint, bool]

The last point. Helper for the CAD point list. The CAD point list is the list of points currently digitized. It contains both “normal” points and intermediate points (construction mode).

New in version 3.22.

Return type:

Tuple[QgsPoint, bool]

customEvent(self, QEvent)
destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)
disable(self)

Disable the widget. Normally done automatically from QgsMapToolAdvancedDigitizing.deactivate().

disconnectNotify(self, QMetaMethod)
dragEnterEvent(self, QDragEnterEvent)
dragLeaveEvent(self, QDragLeaveEvent)
dragMoveEvent(self, QDragMoveEvent)
dropEvent(self, QDropEvent)
enable(self)

Enables the tool (call this when an appropriate map tool is set and in the condition to make use of cad digitizing) Normally done automatically from QgsMapToolAdvancedDigitizing.activate() but may need to be fine tuned if the map tool depends on preconditions like a feature selection.

enableAction(self) QAction

Returns the action used to enable/disable the tools

Return type:

QAction

enabledChangedAngle

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

enabledChangedDistance

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

enabledChangedM

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

enabledChangedX

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

enabledChangedY

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

enabledChangedZ

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

enterEvent(self, QEvent)
event(self, QEvent) bool
eventFilter(self, QObject, QEvent) bool
focusInEvent(self, QFocusEvent)
focusNextChild(self) bool
focusNextPrevChild(self, bool) bool
focusOnAngleRequested

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

focusOnDistanceRequested

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

focusOnMRequested

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

focusOnXRequested

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

focusOnYRequested

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

focusOnZRequested

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

focusOutEvent(self, QFocusEvent)
focusPreviousChild(self) bool
formatCommonAngleSnapping(self, angle: float) str

Returns the formatted label for common angle snapping option.

New in version 3.32.

Parameters:

angle (float) –

Return type:

str

getLineM(self) float

Convenient method to get the M value from the line edit wiget

New in version 3.22.

Return type:

float

getLineZ(self) float

Convenient method to get the Z value from the line edit wiget

New in version 3.22.

Return type:

float

hideEvent(self, QHideEvent)
initPainter(self, QPainter)
initStyleOption(self, QStyleOptionDockWidget)
inputMethodEvent(self, QInputMethodEvent)
isSignalConnected(self, QMetaMethod) bool
keyPressEvent(self, e: QKeyEvent)
Parameters:

e (QKeyEvent) –

keyReleaseEvent(self, QKeyEvent)
leaveEvent(self, QEvent)
lineExtensionSide(self) Qgis.LineExtensionSide

Returns on which side of the constraint line extension point, the line was created

Return type:

Qgis.LineExtensionSide

lockAngleChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

lockDistanceChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

lockMChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

lockXChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

lockYChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

lockZChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

lockedSnapVertices(self) List[QgsPointLocator.Match]

Returns the snap matches whose vertices have been locked

New in version 3.26.

Return type:

List[QgsPointLocator.Match]

mapPointMatch(self) QgsPointLocator.Match

Returns the point locator match

New in version 3.4.

Return type:

QgsPointLocator.Match

metric(self, QPaintDevice.PaintDeviceMetric) int
mouseDoubleClickEvent(self, QMouseEvent)
mouseMoveEvent(self, QMouseEvent)
mousePressEvent(self, QMouseEvent)
mouseReleaseEvent(self, QMouseEvent)
moveEvent(self, QMoveEvent)
nativeEvent(self, Union[QByteArray, bytes, bytearray], PyQt5.sip.voidptr) Tuple[bool, int]
paintEvent(self, QPaintEvent)
penultimatePoint(self) Tuple[QgsPointXY, bool]

The penultimate point. Helper for the CAD point list. The CAD point list is the list of points currently digitized. It contains both “normal” points and intermediate points (construction mode).

Deprecated since version QGIS: 3.22. Use penultimatePointV2() instead.

Return type:

Tuple[QgsPointXY, bool]

penultimatePointV2(self) Tuple[QgsPoint, bool]

The penultimate point. Helper for the CAD point list. The CAD point list is the list of points currently digitized. It contains both “normal” points and intermediate points (construction mode).

Return type:

Tuple[QgsPoint, bool]

pointChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

pointChangedV2

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

pointsCount(self) int

The number of points in the CAD point helper list

Return type:

int

popWarning

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

previousPoint(self) Tuple[QgsPointXY, bool]

The previous point. Helper for the CAD point list. The CAD point list is the list of points currently digitized. It contains both “normal” points and intermediate points (construction mode).

Deprecated since version QGIS: 3.22. Use previousPointV2() instead.

Return type:

Tuple[QgsPointXY, bool]

previousPointV2(self) Tuple[QgsPoint, bool]

The previous point. Helper for the CAD point list. The CAD point list is the list of points currently digitized. It contains both “normal” points and intermediate points (construction mode).

Return type:

Tuple[QgsPoint, bool]

pushWarning

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

receivers(self, PYQT_SIGNAL) int
relativeAngleChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

relativeMChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

relativeXChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

relativeYChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

relativeZChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

releaseLocks(self, releaseRepeatingLocks: bool = True)

unlock all constraints

Parameters:

releaseRepeatingLocks (bool = True) – set to False to preserve the lock for any constraints set to repeating lock mode

removePreviousPoint(self)

Removes previous point in the CAD point list

New in version 3.8.

resizeEvent(self, QResizeEvent)
sender(self) QObject
senderSignalIndex(self) int
setAngle(self, value: str, mode: QgsAdvancedDigitizingDockWidget.WidgetSetMode)

Set the angle value on the widget. Can be used to set constraints by external widgets.

Parameters:

Note

unstable API (will likely change)

New in version 3.8.

setDistance(self, value: str, mode: QgsAdvancedDigitizingDockWidget.WidgetSetMode)

Set the distance value on the widget. Can be used to set constraints by external widgets.

Parameters:

Note

unstable API (will likely change)

New in version 3.8.

setEnabledM(self, enable: bool)

Sets whether M is enabled

New in version 3.22.

Parameters:

enable (bool) –

setEnabledZ(self, enable: bool)

Sets whether Z is enabled

New in version 3.22.

Parameters:

enable (bool) –

setM(self, value: str, mode: QgsAdvancedDigitizingDockWidget.WidgetSetMode)

Set the M value on the widget. Can be used to set constraints by external widgets.

Parameters:

Note

unstable API (will likely change)

New in version 3.22.

setPoints(self, points: Iterable[QgsPointXY])

Configures list of current CAD points

Some map tools may find it useful to override list of CAD points that is otherwise automatically populated when user clicks with left mouse button on map canvas.

Parameters:

points (Iterable[QgsPointXY]) –

setX(self, value: str, mode: QgsAdvancedDigitizingDockWidget.WidgetSetMode)

Set the X value on the widget. Can be used to set constraints by external widgets.

Parameters:

Note

unstable API (will likely change)

New in version 3.8.

setY(self, value: str, mode: QgsAdvancedDigitizingDockWidget.WidgetSetMode)

Set the Y value on the widget. Can be used to set constraints by external widgets.

Parameters:

Note

unstable API (will likely change)

New in version 3.8.

setZ(self, value: str, mode: QgsAdvancedDigitizingDockWidget.WidgetSetMode)

Set the Z value on the widget. Can be used to set constraints by external widgets.

Parameters:

Note

unstable API (will likely change)

New in version 3.22.

sharedPainter(self) QPainter
showEvent(self, event: QShowEvent)
snappedSegment(self) List[QgsPointXY]

Snapped to a segment

Return type:

List[QgsPointXY]

snappedToVertex(self) bool

Is it snapped to a vertex

Return type:

bool

softLockLineExtensionChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

softLockX(self) float

Returns the X value of the X soft lock. The value is NaN is the constraint isn’t magnetized to a line

Return type:

float

softLockXyChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

softLockY(self) float

Returns the Y value of the Y soft lock. The value is NaN is the constraint isn’t magnetized to a line

Return type:

float

switchZM(self)

Determines if Z or M will be enabled.

New in version 3.22.

tabletEvent(self, QTabletEvent)
timerEvent(self, QTimerEvent)
updateCadPaintItem(self)

Updates canvas item that displays constraints on the ma

updateCurrentPoint(self, point: QgsPoint)

Updates the current point in the CAD point list

New in version 3.30.2.

Parameters:

point (QgsPoint) –

updateMicroFocus(self)
valueAngleChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

valueBearingChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

valueCommonAngleSnappingChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

valueDistanceChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

valueMChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

valueXChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

valueYChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

valueZChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

wheelEvent(self, QWheelEvent)