Class: QgsAdvancedDigitizingDockWidget¶
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¶
Class Hierarchy¶
Base classes¶
A QDockWidget subclass with more fine-grained control over how the widget is closed or opened. |
|
- class qgis.gui.QgsAdvancedDigitizingDockWidget[source]¶
Bases:
QgsDockWidget- __init__(canvas: QgsMapCanvas | None, parent: QWidget | None = None, userInputWidget: QgsUserInputWidget | None = None)
Create an advanced digitizing dock widget
- Parameters:
canvas (Optional[QgsMapCanvas]) – The map canvas on which the widget operates
parent (Optional[QWidget] = None) – The parent
userInputWidget (Optional[QgsUserInputWidget] = None) – The user input widget on which tools can add widget overlays on top of the map canvas (since QGIS 3.40)
- AbsoluteAngle = 1¶
- class CadCapacities¶
- class CadCapacities(f: QgsAdvancedDigitizingDockWidget.CadCapacities | QgsAdvancedDigitizingDockWidget.CadCapacity)
- class CadCapacities(a0: QgsAdvancedDigitizingDockWidget.CadCapacities)
Bases:
object
- class CadCapacity¶
Bases:
int
- class CadConstraint[source]¶
Bases:
objectThe 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: Optional[QLineEdit], lockerButton: Optional[QToolButton], relativeButton: Optional[QToolButton] = None, repeatingLockButton: Optional[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(a0: QgsAdvancedDigitizingDockWidget.CadConstraint)
- HardLock = 2¶
- class LockMode¶
Bases:
int
- NoLock = 0¶
- SoftLock = 1¶
- cadConstraintType(self) Qgis.CadConstraintType[source]¶
Returns the constraint type
Added in version 3.32.
- Return type:
- displayValue(self) str[source]¶
Returns a localized formatted string representation of the value.
Added in version 3.32.
- Return type:
str
- isRepeatingLock(self) bool[source]¶
Returns
Trueif a repeating lock is set for the constraint. Repeating locks are not automatically cleared after a new point is added.See also
- Return type:
bool
- lineEdit(self) QLineEdit | None[source]¶
The line edit that manages the value of the constraint
- Return type:
Optional[QLineEdit]
- lockMode(self) QgsAdvancedDigitizingDockWidget.CadConstraint.LockMode[source]¶
The current lock mode of this constraint
- Return type:
- Returns:
Lock mode
- precision(self) int[source]¶
Returns the numeric precision (decimal places) to show in the associated widget.
See also
Added in version 3.22.
- Return type:
int
- static removeSuffix(text: str | None, constraintType: Qgis.CadConstraintType) str[source]¶
Removes unit suffix from the constraint text.
Added in version 3.34.
- Parameters:
text (Optional[str])
constraintType (Qgis.CadConstraintType)
- Return type:
str
- setCadConstraintType(self, constraintType: Qgis.CadConstraintType)[source]¶
Sets the constraint type to
constraintTypeAdded in version 3.32.
- Parameters:
constraintType (Qgis.CadConstraintType)
- setLockMode(self, mode: QgsAdvancedDigitizingDockWidget.CadConstraint.LockMode)[source]¶
Set the lock mode
- Parameters:
mode (QgsAdvancedDigitizingDockWidget.CadConstraint.LockMode)
- setMapCanvas(self, mapCanvas: QgsMapCanvas | None)[source]¶
Sets the map canvas to
mapCanvasAdded in version 3.32.
- Parameters:
mapCanvas (Optional[QgsMapCanvas])
- setPrecision(self, precision: int)[source]¶
Sets the numeric precision (decimal places) to show in the associated widget.
See also
Added in version 3.22.
- Parameters:
precision (int)
- setRelative(self, relative: bool)[source]¶
Set if the constraint should be treated relative
- Parameters:
relative (bool)
- setRepeatingLock(self, repeating: bool)[source]¶
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
Trueto set the lock to repeat automatically
See also
- Distance = 8¶
- FocusOut = 1¶
- RelativeAngle = 2¶
- RelativeCoordinates = 4¶
- ReturnPressed = 0¶
- TextEdited = 2¶
- class WidgetSetMode¶
Bases:
int
- addPoint(self, point: QgsPointXY)[source]¶
Adds point to the CAD point list
- Parameters:
point (QgsPointXY)
- alignToSegment(self, e: QgsMapMouseEvent | None, lockMode: QgsAdvancedDigitizingDockWidget.CadConstraint.LockMode = QgsAdvancedDigitizingDockWidget.CadConstraint.HardLock) bool[source]¶
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 (Optional[QgsMapMouseEvent])
lockMode (QgsAdvancedDigitizingDockWidget.CadConstraint.LockMode = QgsAdvancedDigitizingDockWidget.CadConstraint.HardLock)
- Return type:
bool
- applyConstraints(self, e: QgsMapMouseEvent | None) bool[source]¶
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:
Falseif no solution was found (invalid constraints)- Parameters:
e (Optional[QgsMapMouseEvent])
- betweenLineConstraint(self) Qgis.BetweenLineConstraint[source]¶
Returns the between line constraints which are used to place perpendicular/parallel segments to snapped segments on the canvas
- Return type:
- cadEnabled(self) bool[source]¶
determines if CAD tools are enabled or if map tools behaves “nomally”
- Return type:
bool
- signal cadEnabledChanged[source]¶
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.
- canvasKeyPressEventFilter(self, e: QKeyEvent | None) bool[source]¶
Filter key events to e.g. toggle construction mode or adapt constraints
- Parameters:
e (Optional[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[source]¶
Returns the capacities
Added in version 3.26.
- Return type:
- clearLockedSnapVertices(self, force: bool = True)[source]¶
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.
Added in version 3.26.
- commonAngleConstraint(self) bool[source]¶
Returns
Trueif a constraint on a common angle is active- Return type:
bool
- constraintAngle(self) QgsAdvancedDigitizingDockWidget.CadConstraint | None[source]¶
Returns the
CadConstrainton the angle- Return type:
- constraintDistance(self) QgsAdvancedDigitizingDockWidget.CadConstraint | None[source]¶
Returns the
CadConstrainton the distance- Return type:
- constraintLineExtension(self) QgsAdvancedDigitizingDockWidget.CadConstraint | None[source]¶
Returns the
CadConstraint- Return type:
- constraintM(self) QgsAdvancedDigitizingDockWidget.CadConstraint | None[source]¶
Returns the
CadConstrainton the M coordinateAdded in version 3.22.
- Return type:
- constraintX(self) QgsAdvancedDigitizingDockWidget.CadConstraint | None[source]¶
Returns the
CadConstrainton the X coordinate- Return type:
- constraintXyVertex(self) QgsAdvancedDigitizingDockWidget.CadConstraint | None[source]¶
Returns the
CadConstraint- Return type:
- constraintY(self) QgsAdvancedDigitizingDockWidget.CadConstraint | None[source]¶
Returns the
CadConstrainton the Y coordinate- Return type:
- constraintZ(self) QgsAdvancedDigitizingDockWidget.CadConstraint | None[source]¶
Returns the
CadConstrainton the Z coordinateAdded in version 3.22.
- Return type:
- constructionGuidesLayer(self) QgsVectorLayer | None[source]¶
Returns the vector layer within which construction guides are stored.
Added in version 3.40.
- Return type:
Optional[QgsVectorLayer]
- constructionMode(self) bool[source]¶
Returns whether the construction mode is activated. The construction mode is used to draw intermediate points that will not be part of a geometry being digitized.
- Return type:
bool
- currentPoint(self)[source]¶
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 3.22: Use
currentPointV2()instead.
- currentPointLayerCoordinates(self, layer: QgsMapLayer | None) QgsPoint[source]¶
Returns the last CAD point, in a map
layer’s coordinates.Added in version 3.22.
- Parameters:
layer (Optional[QgsMapLayer])
- Return type:
- currentPointV2(self)[source]¶
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).
Added in version 3.22.
- disable(self)[source]¶
Disable the widget. Normally done automatically from
QgsMapToolAdvancedDigitizing.deactivate().
- enable(self)[source]¶
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 | None[source]¶
Returns the action used to enable/disable the tools
- Return type:
Optional[QAction]
- signal enabledChangedAngle[source]¶
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.
- signal enabledChangedDistance[source]¶
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.
- signal enabledChangedM[source]¶
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.
- signal enabledChangedX[source]¶
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.
- signal enabledChangedY[source]¶
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.
- signal enabledChangedZ[source]¶
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.
- signal focusOnAngleRequested[source]¶
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.
- signal focusOnDistanceRequested[source]¶
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.
- signal focusOnMRequested[source]¶
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.
- signal focusOnXRequested[source]¶
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.
- signal focusOnYRequested[source]¶
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.
- signal focusOnZRequested[source]¶
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.
- formatCommonAngleSnapping(self, angle: float) str[source]¶
Returns the formatted label for common angle snapping option.
Added in version 3.32.
- Parameters:
angle (float)
- Return type:
str
- getLineM(self) float[source]¶
Convenient method to get the M value from the line edit wiget
Added in version 3.22.
- Return type:
float
- getLineZ(self) float[source]¶
Convenient method to get the Z value from the line edit wiget
Added in version 3.22.
- Return type:
float
- lineExtensionSide(self) Qgis.LineExtensionSide[source]¶
Returns on which side of the constraint line extension point, the line was created
- Return type:
- signal lockAngleChanged[source]¶
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.
- signal lockDistanceChanged[source]¶
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.
- signal lockMChanged[source]¶
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.
- signal lockXChanged[source]¶
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.
- signal lockYChanged[source]¶
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.
- signal lockZChanged[source]¶
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.
- lockedSnapVertices(self) List[QgsPointLocator.Match]¶
Returns the snap matches whose vertices have been locked
Added in version 3.26.
- Return type:
- mapPointMatch(self) QgsPointLocator.Match[source]¶
Returns the point locator match
Added in version 3.4.
- Return type:
- penultimatePoint(self)[source]¶
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 3.22: Use
penultimatePointV2()instead.
- penultimatePointV2(self)[source]¶
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).
- signal pointChanged[source]¶
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.
- signal pointChangedV2[source]¶
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.
- signal popWarning[source]¶
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.
- previousPoint(self)[source]¶
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 3.22: Use
previousPointV2()instead.
- previousPointV2(self)[source]¶
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).
- processCanvasMoveEvent(self, event: QgsMapMouseEvent | None)[source]¶
Processes the canvas move
event.- Parameters:
event (Optional[QgsMapMouseEvent])
- processCanvasPressEvent(self, event: QgsMapMouseEvent | None)[source]¶
Processes the canvas press
event.- Parameters:
event (Optional[QgsMapMouseEvent])
- processCanvasReleaseEvent(self, event: QgsMapMouseEvent | None)[source]¶
Processes the canvas release
event.- Parameters:
event (Optional[QgsMapMouseEvent])
- signal pushWarning[source]¶
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.
- recordConstructionGuides(self) bool[source]¶
Returns whether construction guides are being recorded.
Added in version 3.40.
- Return type:
bool
- signal relativeAngleChanged[source]¶
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.
- signal relativeMChanged[source]¶
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.
- signal relativeXChanged[source]¶
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.
- signal relativeYChanged[source]¶
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.
- signal relativeZChanged[source]¶
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.
- releaseLocks(self, releaseRepeatingLocks: bool = True)[source]¶
unlock all constraints
- Parameters:
releaseRepeatingLocks (bool = True) – set to
Falseto preserve the lock for any constraints set to repeating lock mode
- removePreviousPoint(self)[source]¶
Removes previous point in the CAD point list
Added in version 3.8.
- setAngle(self, value: str | None, mode: QgsAdvancedDigitizingDockWidget.WidgetSetMode)[source]¶
Set the angle value on the widget. Can be used to set constraints by external widgets.
- Parameters:
mode (QgsAdvancedDigitizingDockWidget.WidgetSetMode) – What type of interaction to emulate
value (Optional[str]) – The value (as a string, as it could be an expression)
Note
unstable API (will likely change)
Added in version 3.8.
- setDistance(self, value: str | None, mode: QgsAdvancedDigitizingDockWidget.WidgetSetMode)[source]¶
Set the distance value on the widget. Can be used to set constraints by external widgets.
- Parameters:
mode (QgsAdvancedDigitizingDockWidget.WidgetSetMode) – What type of interaction to emulate
value (Optional[str]) – The value (as a string, as it could be an expression)
Note
unstable API (will likely change)
Added in version 3.8.
- setEnabledM(self, enable: bool)[source]¶
Sets whether M is enabled
Added in version 3.22.
- Parameters:
enable (bool)
- setEnabledZ(self, enable: bool)[source]¶
Sets whether Z is enabled
Added in version 3.22.
- Parameters:
enable (bool)
- setM(self, value: str | None, mode: QgsAdvancedDigitizingDockWidget.WidgetSetMode)[source]¶
Set the M value on the widget. Can be used to set constraints by external widgets.
- Parameters:
mode (QgsAdvancedDigitizingDockWidget.WidgetSetMode) – What type of interaction to emulate
value (Optional[str]) – The value (as a string, as it could be an expression)
Note
unstable API (will likely change)
Added in version 3.22.
- setPoints(self, points: Iterable[QgsPointXY])[source]¶
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])
- setTool(self, tool: QgsAdvancedDigitizingTool | None)[source]¶
Sets an advanced digitizing tool which will take over digitizing until the tool is close.
Added in version 3.40.
- Parameters:
tool (Optional[QgsAdvancedDigitizingTool])
- setX(self, value: str | None, mode: QgsAdvancedDigitizingDockWidget.WidgetSetMode)[source]¶
Set the X value on the widget. Can be used to set constraints by external widgets.
- Parameters:
mode (QgsAdvancedDigitizingDockWidget.WidgetSetMode) – What type of interaction to emulate
value (Optional[str]) – The value (as a string, as it could be an expression)
Note
unstable API (will likely change)
Added in version 3.8.
- setY(self, value: str | None, mode: QgsAdvancedDigitizingDockWidget.WidgetSetMode)[source]¶
Set the Y value on the widget. Can be used to set constraints by external widgets.
- Parameters:
mode (QgsAdvancedDigitizingDockWidget.WidgetSetMode) – What type of interaction to emulate
value (Optional[str]) – The value (as a string, as it could be an expression)
Note
unstable API (will likely change)
Added in version 3.8.
- setZ(self, value: str | None, mode: QgsAdvancedDigitizingDockWidget.WidgetSetMode)[source]¶
Set the Z value on the widget. Can be used to set constraints by external widgets.
- Parameters:
mode (QgsAdvancedDigitizingDockWidget.WidgetSetMode) – What type of interaction to emulate
value (Optional[str]) – The value (as a string, as it could be an expression)
Note
unstable API (will likely change)
Added in version 3.22.
- showConstructionGuides(self) bool[source]¶
Returns whether the construction guides are visible.
Added in version 3.40.
- Return type:
bool
- snapToConstructionGuides(self) bool[source]¶
Returns whether points should snap to construction guides.
Added in version 3.40.
- Return type:
bool
- snappedSegment(self) List[QgsPointXY]¶
Snapped to a segment
- Return type:
- signal softLockLineExtensionChanged[source]¶
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.
- softLockX(self) float[source]¶
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
- signal softLockXyChanged[source]¶
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.
- softLockY(self) float[source]¶
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
- tool(self) QgsAdvancedDigitizingTool | None[source]¶
Returns the current advanced digitizing tool. Returns
Noneif not set.Added in version 3.40.
- Return type:
Optional[QgsAdvancedDigitizingTool]
- updateCurrentPoint(self, point: QgsPoint)[source]¶
Updates the current
pointin the CAD point listAdded in version 3.30.2.
- Parameters:
point (QgsPoint)
- signal valueAngleChanged[source]¶
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.
- signal valueBearingChanged[source]¶
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.
- signal valueCommonAngleSnappingChanged[source]¶
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.
- signal valueDistanceChanged[source]¶
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.
- signal valueMChanged[source]¶
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.
- signal valueXChanged[source]¶
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.
- signal valueYChanged[source]¶
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.
- signal valueZChanged[source]¶
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.