QGIS API Documentation 3.38.0-Grenoble (exported)
Loading...
Searching...
No Matches
Classes | Public Types | Signals | Public Member Functions | Friends | List of all members
QgsAdvancedDigitizingDockWidget Class Reference

The QgsAdvancedDigitizingDockWidget class is a dockable widget used to handle the CAD tools on top of a selection of map tools. More...

#include <qgsadvanceddigitizingdockwidget.h>

Inheritance diagram for QgsAdvancedDigitizingDockWidget:
Inheritance graph
[legend]

Classes

class  CadConstraint
 The CadConstraint is a class for all basic constraints (angle/distance/x/y). More...
 

Public Types

typedef QFlags< CadCapacityCadCapacities
 
enum  CadCapacity { AbsoluteAngle = 1 , RelativeAngle = 2 , RelativeCoordinates = 4 , Distance = 8 }
 The CadCapacity enum defines the possible constraints to be set depending on the number of points in the CAD point list (the list of points currently digitized) More...
 
enum  WidgetSetMode { ReturnPressed , FocusOut , TextEdited }
 Type of interaction to simulate when editing values from external widget. More...
 

Signals

void cadEnabledChanged (bool enabled)
 Signals for external widgets that need to update according to current values.
 
void commonAngleSnappingShowInFloaterChanged (bool enabled)
 Emitted whenever the option to show common angle snapping in the floater changes.
 
void enabledChangedAngle (bool enabled)
 Emitted whenever the angle field is enabled or disabled.
 
void enabledChangedDistance (bool enabled)
 Emitted whenever the distance field is enabled or disabled.
 
void enabledChangedM (bool enabled)
 Emitted whenever the M field is enabled or disabled.
 
void enabledChangedX (bool enabled)
 Emitted whenever the X field is enabled or disabled.
 
void enabledChangedY (bool enabled)
 Emitted whenever the Y field is enabled or disabled.
 
void enabledChangedZ (bool enabled)
 Emitted whenever the Z field is enabled or disabled.
 
void focusOnAngleRequested ()
 Emitted whenever the angle field should get the focus using the shortcuts (A).
 
void focusOnDistanceRequested ()
 Emitted whenever the distance field should get the focus using the shortcuts (D).
 
void focusOnMRequested ()
 Emitted whenever the M field should get the focus using the shortcuts (M).
 
void focusOnXRequested ()
 Emitted whenever the X field should get the focus using the shortcuts (X).
 
void focusOnYRequested ()
 Emitted whenever the Y field should get the focus using the shortcuts (Y).
 
void focusOnZRequested ()
 Emitted whenever the Z field should get the focus using the shortcuts (Z).
 
void lockAngleChanged (bool locked)
 Emitted whenever the angle parameter is locked.
 
void lockDistanceChanged (bool locked)
 Emitted whenever the distance parameter is locked.
 
void lockMChanged (bool locked)
 Emitted whenever the M parameter is locked.
 
void lockXChanged (bool locked)
 Emitted whenever the X parameter is locked.
 
void lockYChanged (bool locked)
 Emitted whenever the Y parameter is locked.
 
void lockZChanged (bool locked)
 Emitted whenever the Z parameter is locked.
 
Q_DECL_DEPRECATED void pointChanged (const QgsPointXY &point)
 Sometimes a constraint may change the current point out of a mouse event.
 
void pointChangedV2 (const QgsPoint &point)
 Sometimes a constraint may change the current point out of a mouse event.
 
void popWarning ()
 Remove any previously emitted warnings (if any)
 
void pushWarning (const QString &message)
 Push a warning.
 
void relativeAngleChanged (bool relative)
 Emitted whenever the angleX parameter is toggled between absolute and relative.
 
void relativeMChanged (bool relative)
 Emitted whenever the M parameter is toggled between absolute and relative.
 
void relativeXChanged (bool relative)
 Emitted whenever the X parameter is toggled between absolute and relative.
 
void relativeYChanged (bool relative)
 Emitted whenever the Y parameter is toggled between absolute and relative.
 
void relativeZChanged (bool relative)
 Emitted whenever the Z parameter is toggled between absolute and relative.
 
void softLockLineExtensionChanged (bool locked)
 Emitted whenever the soft line extension parameter is locked.
 
void softLockXyChanged (bool locked)
 Emitted whenever the soft x/y extension parameter is locked.
 
void valueAngleChanged (const QString &value)
 Emitted whenever the angle value changes (either the mouse moved, or the user changed the input).
 
void valueBearingChanged (const QString &value)
 Emitted whenever the bearing value changes.
 
void valueCommonAngleSnappingChanged (double angle)
 Emitted whenever the snapping to common angle option changes, angle = 0 means that the functionality is disabled.
 
void valueDistanceChanged (const QString &value)
 Emitted whenever the distance value changes (either the mouse moved, or the user changed the input).
 
void valueMChanged (const QString &value)
 Emitted whenever the M value changes (either the mouse moved, or the user changed the input).
 
void valueXChanged (const QString &value)
 Emitted whenever the X value changes (either the mouse moved, or the user changed the input).
 
void valueYChanged (const QString &value)
 Emitted whenever the Y value changes (either the mouse moved, or the user changed the input).
 
void valueZChanged (const QString &value)
 Emitted whenever the Z value changes (either the mouse moved, or the user changed the input).
 
- Signals inherited from QgsDockWidget
void closed ()
 Emitted when dock widget is closed.
 
void closedStateChanged (bool wasClosed)
 Emitted when dock widget is closed (or opened).
 
void opened ()
 Emitted when dock widget is opened.
 
void openedStateChanged (bool wasOpened)
 Emitted when dock widget is opened (or closed).
 

Public Member Functions

 QgsAdvancedDigitizingDockWidget (QgsMapCanvas *canvas, QWidget *parent=nullptr)
 Create an advanced digitizing dock widget.
 
void addPoint (const QgsPointXY &point)
 Adds point to the CAD point list.
 
bool alignToSegment (QgsMapMouseEvent *e, QgsAdvancedDigitizingDockWidget::CadConstraint::LockMode lockMode=QgsAdvancedDigitizingDockWidget::CadConstraint::HardLock)
 align to segment for between line constraint.
 
bool applyConstraints (QgsMapMouseEvent *e)
 apply the CAD constraints.
 
Qgis::BetweenLineConstraint betweenLineConstraint () const
 Returns the between line constraints which are used to place perpendicular/parallel segments to snapped segments on the canvas.
 
bool cadEnabled () const
 determines if CAD tools are enabled or if map tools behaves "nomally"
 
bool canvasKeyPressEventFilter (QKeyEvent *e)
 Filter key events to e.g.
 
CadCapacities capacities () const
 Returns the capacities.
 
void clear ()
 Clear any cached previous clicks and helper lines.
 
void clearLockedSnapVertices (bool force=true)
 Removes all points from the locked snap vertex list.
 
void clearPoints ()
 Removes all points from the CAD point list.
 
bool commonAngleConstraint () const
 Returns true if a constraint on a common angle is active.
 
const CadConstraintconstraintAngle () const
 Returns the CadConstraint on the angle.
 
const CadConstraintconstraintDistance () const
 Returns the CadConstraint on the distance.
 
const CadConstraintconstraintLineExtension () const
 Returns the CadConstraint.
 
const CadConstraintconstraintM () const
 Returns the CadConstraint on the M coordinate.
 
const CadConstraintconstraintX () const
 Returns the CadConstraint on the X coordinate.
 
const CadConstraintconstraintXyVertex () const
 Returns the CadConstraint.
 
const CadConstraintconstraintY () const
 Returns the CadConstraint on the Y coordinate.
 
const CadConstraintconstraintZ () const
 Returns the CadConstraint on the Z coordinate.
 
bool constructionMode () const
 construction mode is used to draw intermediate points. These points won't be given any further (i.e. to the map tools)
 
Q_DECL_DEPRECATED QgsPointXY currentPoint (bool *exists=nullptr) const
 The last point.
 
QgsPoint currentPointLayerCoordinates (QgsMapLayer *layer) const
 Returns the last CAD point, in a map layer's coordinates.
 
QgsPoint currentPointV2 (bool *exists=nullptr) const
 The last point.
 
void disable ()
 Disable the widget.
 
void enable ()
 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.
 
QAction * enableAction ()
 Returns the action used to enable/disable the tools.
 
QString formatCommonAngleSnapping (double angle)
 Returns the formatted label for common angle snapping option.
 
double getLineM () const
 Convenient method to get the M value from the line edit wiget.
 
double getLineZ () const
 Convenient method to get the Z value from the line edit wiget.
 
void keyPressEvent (QKeyEvent *e) override
 
Qgis::LineExtensionSide lineExtensionSide () const
 Returns on which side of the constraint line extension point, the line was created.
 
QList< QgsPointLocator::MatchlockedSnapVertices () const
 Returns the snap matches whose vertices have been locked.
 
QgsPointLocator::Match mapPointMatch () const
 Returns the point locator match.
 
Q_DECL_DEPRECATED QgsPointXY penultimatePoint (bool *exists=nullptr) const
 The penultimate point.
 
QgsPoint penultimatePointV2 (bool *exists=nullptr) const
 The penultimate point.
 
int pointsCount () const
 The number of points in the CAD point helper list.
 
Q_DECL_DEPRECATED QgsPointXY previousPoint (bool *exists=nullptr) const
 The previous point.
 
QgsPoint previousPointV2 (bool *exists=nullptr) const
 The previous point.
 
void releaseLocks (bool releaseRepeatingLocks=true)
 unlock all constraints
 
void removePreviousPoint ()
 Removes previous point in the CAD point list.
 
void setAngle (const QString &value, WidgetSetMode mode)
 Set the angle value on the widget.
 
void setDistance (const QString &value, WidgetSetMode mode)
 Set the distance value on the widget.
 
void setEnabledM (bool enable)
 Sets whether M is enabled.
 
void setEnabledZ (bool enable)
 Sets whether Z is enabled.
 
void setM (const QString &value, WidgetSetMode mode)
 Set the M value on the widget.
 
void setPoints (const QList< QgsPointXY > &points)
 Configures list of current CAD points.
 
void setX (const QString &value, WidgetSetMode mode)
 Set the X value on the widget.
 
void setY (const QString &value, WidgetSetMode mode)
 Set the Y value on the widget.
 
void setZ (const QString &value, WidgetSetMode mode)
 Set the Z value on the widget.
 
QList< QgsPointXYsnappedSegment () const
 Snapped to a segment.
 
bool snappedToVertex () const
 Is it snapped to a vertex.
 
double softLockX () const
 Returns the X value of the X soft lock. The value is NaN is the constraint isn't magnetized to a line.
 
double softLockY () const
 Returns the Y value of the Y soft lock. The value is NaN is the constraint isn't magnetized to a line.
 
void switchZM ()
 Determines if Z or M will be enabled.
 
void updateCadPaintItem ()
 Updates canvas item that displays constraints on the ma.
 
void updateCurrentPoint (const QgsPoint &point)
 Updates the current point in the CAD point list.
 
- Public Member Functions inherited from QgsDockWidget
 QgsDockWidget (const QString &title, QWidget *parent=nullptr, Qt::WindowFlags flags=Qt::WindowFlags())
 Constructor for QgsDockWidget.
 
 QgsDockWidget (QWidget *parent=nullptr, Qt::WindowFlags flags=Qt::WindowFlags())
 Constructor for QgsDockWidget.
 
bool isUserVisible () const
 Returns true if the dock is both opened and raised to the front (ie not hidden by any other tabs.
 
void setToggleVisibilityAction (QAction *action)
 Links an action to the dock, so that toggling the action will automatically set the dock's visibility to suit (and changing the dock visibility will update the action's state).
 
QAction * toggleVisibilityAction ()
 Returns the action linked to the dock.
 

Friends

class TestQgsAdvancedDigitizing
 
class TestQgsAdvancedDigitizingDockWidget
 

Additional Inherited Members

- Public Slots inherited from QgsDockWidget
void setUserVisible (bool visible)
 Sets the dock widget as visible to a user, ie both shown and raised to the front.
 
void toggleUserVisible ()
 Toggles whether the dock is user visible.
 
- Protected Member Functions inherited from QgsDockWidget
void closeEvent (QCloseEvent *) override
 
void showEvent (QShowEvent *event) override
 

Detailed Description

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.

Definition at line 48 of file qgsadvanceddigitizingdockwidget.h.

Member Typedef Documentation

◆ CadCapacities

Definition at line 66 of file qgsadvanceddigitizingdockwidget.h.

Member Enumeration Documentation

◆ CadCapacity

The CadCapacity enum defines the possible constraints to be set depending on the number of points in the CAD point list (the list of points currently digitized)

Enumerator
AbsoluteAngle 

Azimuth.

RelativeAngle 

Also for parallel and perpendicular.

RelativeCoordinates 

This corresponds to distance and relative coordinates.

Distance 

Distance.

Definition at line 59 of file qgsadvanceddigitizingdockwidget.h.

◆ WidgetSetMode

Type of interaction to simulate when editing values from external widget.

Note
unstable API (will likely change)
Since
QGIS 3.8
Enumerator
ReturnPressed 
FocusOut 
TextEdited 

Definition at line 74 of file qgsadvanceddigitizingdockwidget.h.

Constructor & Destructor Documentation

◆ QgsAdvancedDigitizingDockWidget()

QgsAdvancedDigitizingDockWidget::QgsAdvancedDigitizingDockWidget ( QgsMapCanvas canvas,
QWidget *  parent = nullptr 
)
explicit

Create an advanced digitizing dock widget.

Parameters
canvasThe map canvas on which the widget operates
parentThe parent

Definition at line 48 of file qgsadvanceddigitizingdockwidget.cpp.

Member Function Documentation

◆ addPoint()

void QgsAdvancedDigitizingDockWidget::addPoint ( const QgsPointXY point)

Adds point to the CAD point list.

Definition at line 1894 of file qgsadvanceddigitizingdockwidget.cpp.

◆ alignToSegment()

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.

Definition at line 1430 of file qgsadvanceddigitizingdockwidget.cpp.

◆ applyConstraints()

bool QgsAdvancedDigitizingDockWidget::applyConstraints ( QgsMapMouseEvent e)

apply the CAD constraints.

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

Returns
false if no solution was found (invalid constraints)

Definition at line 1179 of file qgsadvanceddigitizingdockwidget.cpp.

◆ betweenLineConstraint()

Qgis::BetweenLineConstraint QgsAdvancedDigitizingDockWidget::betweenLineConstraint ( ) const
inline

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

Definition at line 315 of file qgsadvanceddigitizingdockwidget.h.

◆ cadEnabled()

bool QgsAdvancedDigitizingDockWidget::cadEnabled ( ) const
inline

determines if CAD tools are enabled or if map tools behaves "nomally"

Definition at line 288 of file qgsadvanceddigitizingdockwidget.h.

◆ cadEnabledChanged

void QgsAdvancedDigitizingDockWidget::cadEnabledChanged ( bool  enabled)
signal

Signals for external widgets that need to update according to current values.

Emitted whenever CAD is enabled or disabled

Parameters
enabledWhether CAD is enabled or not
Note
unstable API (will likely change).
Since
QGIS 3.8

◆ canvasKeyPressEventFilter()

bool QgsAdvancedDigitizingDockWidget::canvasKeyPressEventFilter ( QKeyEvent *  e)

Filter key events to e.g.

toggle construction mode or adapt constraints

Parameters
eA mouse event (may be modified)
Returns
If the event is hidden (construction mode hides events from the maptool)

Definition at line 1471 of file qgsadvanceddigitizingdockwidget.cpp.

◆ capacities()

CadCapacities QgsAdvancedDigitizingDockWidget::capacities ( ) const
inline

Returns the capacities.

Since
QGIS 3.26

Definition at line 569 of file qgsadvanceddigitizingdockwidget.h.

◆ clear()

void QgsAdvancedDigitizingDockWidget::clear ( )

Clear any cached previous clicks and helper lines.

Definition at line 1502 of file qgsadvanceddigitizingdockwidget.cpp.

◆ clearLockedSnapVertices()

void QgsAdvancedDigitizingDockWidget::clearLockedSnapVertices ( bool  force = true)

Removes all points from the locked snap vertex list.

Parameters
forceClears the list even if the constraints that use it are still locked.
Since
QGIS 3.26

Definition at line 1883 of file qgsadvanceddigitizingdockwidget.cpp.

◆ clearPoints()

void QgsAdvancedDigitizingDockWidget::clearPoints ( )

Removes all points from the CAD point list.

Definition at line 1921 of file qgsadvanceddigitizingdockwidget.cpp.

◆ commonAngleConstraint()

bool QgsAdvancedDigitizingDockWidget::commonAngleConstraint ( ) const
inline

Returns true if a constraint on a common angle is active.

Definition at line 337 of file qgsadvanceddigitizingdockwidget.h.

◆ commonAngleSnappingShowInFloaterChanged

void QgsAdvancedDigitizingDockWidget::commonAngleSnappingShowInFloaterChanged ( bool  enabled)
signal

Emitted whenever the option to show common angle snapping in the floater changes.

Note
Not available in Python bindings

◆ constraintAngle()

const CadConstraint * QgsAdvancedDigitizingDockWidget::constraintAngle ( ) const
inline

Returns the CadConstraint on the angle.

Definition at line 317 of file qgsadvanceddigitizingdockwidget.h.

◆ constraintDistance()

const CadConstraint * QgsAdvancedDigitizingDockWidget::constraintDistance ( ) const
inline

Returns the CadConstraint on the distance.

Definition at line 319 of file qgsadvanceddigitizingdockwidget.h.

◆ constraintLineExtension()

const CadConstraint * QgsAdvancedDigitizingDockWidget::constraintLineExtension ( ) const
inline

Returns the CadConstraint.

Definition at line 340 of file qgsadvanceddigitizingdockwidget.h.

◆ constraintM()

const CadConstraint * QgsAdvancedDigitizingDockWidget::constraintM ( ) const
inline

Returns the CadConstraint on the M coordinate.

Since
QGIS 3.22

Definition at line 335 of file qgsadvanceddigitizingdockwidget.h.

◆ constraintX()

const CadConstraint * QgsAdvancedDigitizingDockWidget::constraintX ( ) const
inline

Returns the CadConstraint on the X coordinate.

Definition at line 321 of file qgsadvanceddigitizingdockwidget.h.

◆ constraintXyVertex()

const CadConstraint * QgsAdvancedDigitizingDockWidget::constraintXyVertex ( ) const
inline

Returns the CadConstraint.

Definition at line 346 of file qgsadvanceddigitizingdockwidget.h.

◆ constraintY()

const CadConstraint * QgsAdvancedDigitizingDockWidget::constraintY ( ) const
inline

Returns the CadConstraint on the Y coordinate.

Definition at line 323 of file qgsadvanceddigitizingdockwidget.h.

◆ constraintZ()

const CadConstraint * QgsAdvancedDigitizingDockWidget::constraintZ ( ) const
inline

Returns the CadConstraint on the Z coordinate.

Since
QGIS 3.22

Definition at line 329 of file qgsadvanceddigitizingdockwidget.h.

◆ constructionMode()

bool QgsAdvancedDigitizingDockWidget::constructionMode ( ) const
inline

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

Definition at line 309 of file qgsadvanceddigitizingdockwidget.h.

◆ currentPoint()

Q_DECL_DEPRECATED QgsPointXY QgsAdvancedDigitizingDockWidget::currentPoint ( bool *  exists = nullptr) const
inline

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 QGIS 3.22. Use currentPointV2() instead.

Definition at line 425 of file qgsadvanceddigitizingdockwidget.h.

◆ currentPointLayerCoordinates()

QgsPoint QgsAdvancedDigitizingDockWidget::currentPointLayerCoordinates ( QgsMapLayer layer) const

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

Since
QGIS 3.22

Definition at line 2102 of file qgsadvanceddigitizingdockwidget.cpp.

◆ currentPointV2()

QgsPoint QgsAdvancedDigitizingDockWidget::currentPointV2 ( bool *  exists = nullptr) const

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).

Since
QGIS 3.22

Definition at line 2092 of file qgsadvanceddigitizingdockwidget.cpp.

◆ disable()

void QgsAdvancedDigitizingDockWidget::disable ( )

Disable the widget.

Normally done automatically from QgsMapToolAdvancedDigitizing::deactivate().

Definition at line 1862 of file qgsadvanceddigitizingdockwidget.cpp.

◆ enable()

void QgsAdvancedDigitizingDockWidget::enable ( )

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.

Definition at line 1818 of file qgsadvanceddigitizingdockwidget.cpp.

◆ enableAction()

QAction * QgsAdvancedDigitizingDockWidget::enableAction ( )
inline

Returns the action used to enable/disable the tools.

Definition at line 473 of file qgsadvanceddigitizingdockwidget.h.

◆ enabledChangedAngle

void QgsAdvancedDigitizingDockWidget::enabledChangedAngle ( bool  enabled)
signal

Emitted whenever the angle field is enabled or disabled.

Depending on the context, some parameters do not make sense (e.g. you need a previous point to define a distance). Could be used by widgets that must reflect the current advanced digitizing state.

Parameters
enabledWhether the angle parameter is enabled or not.
Note
unstable API (will likely change)
Since
QGIS 3.8

◆ enabledChangedDistance

void QgsAdvancedDigitizingDockWidget::enabledChangedDistance ( bool  enabled)
signal

Emitted whenever the distance field is enabled or disabled.

Depending on the context, some parameters do not make sense (e.g. you need a previous point to define a distance). Could be used by widgets that must reflect the current advanced digitizing state.

Parameters
enabledWhether the distance parameter is enabled or not.
Note
unstable API (will likely change)
Since
QGIS 3.8

◆ enabledChangedM

void QgsAdvancedDigitizingDockWidget::enabledChangedM ( bool  enabled)
signal

Emitted whenever the M field is enabled or disabled.

Depending on the context, some parameters do not make sense (e.g. you need a previous point to define a distance). Could be used by widgets that must reflect the current advanced digitizing state.

Parameters
enabledWhether the M parameter is enabled or not.
Note
unstable API (will likely change)
Since
QGIS 3.22

◆ enabledChangedX

void QgsAdvancedDigitizingDockWidget::enabledChangedX ( bool  enabled)
signal

Emitted whenever the X field is enabled or disabled.

Depending on the context, some parameters do not make sense (e.g. you need a previous point to define a distance). Could be used by widgets that must reflect the current advanced digitizing state.

Parameters
enabledWhether the X parameter is enabled or not.
Note
unstable API (will likely change)
Since
QGIS 3.8

◆ enabledChangedY

void QgsAdvancedDigitizingDockWidget::enabledChangedY ( bool  enabled)
signal

Emitted whenever the Y field is enabled or disabled.

Depending on the context, some parameters do not make sense (e.g. you need a previous point to define a distance). Could be used by widgets that must reflect the current advanced digitizing state.

Parameters
enabledWhether the Y parameter is enabled or not.
Note
unstable API (will likely change)
Since
QGIS 3.8

◆ enabledChangedZ

void QgsAdvancedDigitizingDockWidget::enabledChangedZ ( bool  enabled)
signal

Emitted whenever the Z field is enabled or disabled.

Depending on the context, some parameters do not make sense (e.g. you need a previous point to define a distance). Could be used by widgets that must reflect the current advanced digitizing state.

Parameters
enabledWhether the Z parameter is enabled or not.
Note
unstable API (will likely change)
Since
QGIS 3.22

◆ focusOnAngleRequested

void QgsAdvancedDigitizingDockWidget::focusOnAngleRequested ( )
signal

Emitted whenever the angle field should get the focus using the shortcuts (A).

Could be used by widgets to capture the focus when a field is being edited.

Note
unstable API (will likely change)
Since
QGIS 3.8

◆ focusOnDistanceRequested

void QgsAdvancedDigitizingDockWidget::focusOnDistanceRequested ( )
signal

Emitted whenever the distance field should get the focus using the shortcuts (D).

Could be used by widgets to capture the focus when a field is being edited.

Note
unstable API (will likely change)
Since
QGIS 3.8

◆ focusOnMRequested

void QgsAdvancedDigitizingDockWidget::focusOnMRequested ( )
signal

Emitted whenever the M field should get the focus using the shortcuts (M).

Could be used by widgets to capture the focus when a field is being edited.

Note
unstable API (will likely change)
Since
QGIS 3.22

◆ focusOnXRequested

void QgsAdvancedDigitizingDockWidget::focusOnXRequested ( )
signal

Emitted whenever the X field should get the focus using the shortcuts (X).

Could be used by widgets to capture the focus when a field is being edited.

Note
unstable API (will likely change)
Since
QGIS 3.8

◆ focusOnYRequested

void QgsAdvancedDigitizingDockWidget::focusOnYRequested ( )
signal

Emitted whenever the Y field should get the focus using the shortcuts (Y).

Could be used by widgets to capture the focus when a field is being edited.

Note
unstable API (will likely change)
Since
QGIS 3.8

◆ focusOnZRequested

void QgsAdvancedDigitizingDockWidget::focusOnZRequested ( )
signal

Emitted whenever the Z field should get the focus using the shortcuts (Z).

Could be used by widgets to capture the focus when a field is being edited.

Note
unstable API (will likely change)
Since
QGIS 3.22

◆ formatCommonAngleSnapping()

QString QgsAdvancedDigitizingDockWidget::formatCommonAngleSnapping ( double  angle)

Returns the formatted label for common angle snapping option.

Since
QGIS 3.32

Definition at line 374 of file qgsadvanceddigitizingdockwidget.cpp.

◆ getLineM()

double QgsAdvancedDigitizingDockWidget::getLineM ( ) const

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

Since
QGIS 3.22

Definition at line 2145 of file qgsadvanceddigitizingdockwidget.cpp.

◆ getLineZ()

double QgsAdvancedDigitizingDockWidget::getLineZ ( ) const

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

Since
QGIS 3.22

Definition at line 2140 of file qgsadvanceddigitizingdockwidget.cpp.

◆ keyPressEvent()

void QgsAdvancedDigitizingDockWidget::keyPressEvent ( QKeyEvent *  e)
override

Definition at line 1508 of file qgsadvanceddigitizingdockwidget.cpp.

◆ lineExtensionSide()

Qgis::LineExtensionSide QgsAdvancedDigitizingDockWidget::lineExtensionSide ( ) const
inline

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

Definition at line 343 of file qgsadvanceddigitizingdockwidget.h.

◆ lockAngleChanged

void QgsAdvancedDigitizingDockWidget::lockAngleChanged ( bool  locked)
signal

Emitted whenever the angle parameter is locked.

Could be used by widgets that must reflect the current advanced digitizing state.

Note
unstable API (will likely change)
Since
QGIS 3.8

◆ lockDistanceChanged

void QgsAdvancedDigitizingDockWidget::lockDistanceChanged ( bool  locked)
signal

Emitted whenever the distance parameter is locked.

Could be used by widgets that must reflect the current advanced digitizing state.

Note
unstable API (will likely change)
Since
QGIS 3.8

◆ lockedSnapVertices()

QList< QgsPointLocator::Match > QgsAdvancedDigitizingDockWidget::lockedSnapVertices ( ) const
inline

Returns the snap matches whose vertices have been locked.

Since
QGIS 3.26

Definition at line 364 of file qgsadvanceddigitizingdockwidget.h.

◆ lockMChanged

void QgsAdvancedDigitizingDockWidget::lockMChanged ( bool  locked)
signal

Emitted whenever the M parameter is locked.

Could be used by widgets that must reflect the current advanced digitizing state.

Note
unstable API (will likely change)
Since
QGIS 3.22

◆ lockXChanged

void QgsAdvancedDigitizingDockWidget::lockXChanged ( bool  locked)
signal

Emitted whenever the X parameter is locked.

Could be used by widgets that must reflect the current advanced digitizing state.

Note
unstable API (will likely change)
Since
QGIS 3.8

◆ lockYChanged

void QgsAdvancedDigitizingDockWidget::lockYChanged ( bool  locked)
signal

Emitted whenever the Y parameter is locked.

Could be used by widgets that must reflect the current advanced digitizing state.

Note
unstable API (will likely change)
Since
QGIS 3.8

◆ lockZChanged

void QgsAdvancedDigitizingDockWidget::lockZChanged ( bool  locked)
signal

Emitted whenever the Z parameter is locked.

Could be used by widgets that must reflect the current advanced digitizing state.

Note
unstable API (will likely change)
Since
QGIS 3.22

◆ mapPointMatch()

QgsPointLocator::Match QgsAdvancedDigitizingDockWidget::mapPointMatch ( ) const
inline

Returns the point locator match.

Since
QGIS 3.4

Definition at line 358 of file qgsadvanceddigitizingdockwidget.h.

◆ penultimatePoint()

Q_DECL_DEPRECATED QgsPointXY QgsAdvancedDigitizingDockWidget::penultimatePoint ( bool *  exists = nullptr) const
inline

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 QGIS 3.22. Use penultimatePointV2() instead.

Definition at line 455 of file qgsadvanceddigitizingdockwidget.h.

◆ penultimatePointV2()

QgsPoint QgsAdvancedDigitizingDockWidget::penultimatePointV2 ( bool *  exists = nullptr) const

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).

Definition at line 2125 of file qgsadvanceddigitizingdockwidget.cpp.

◆ pointChanged

Q_DECL_DEPRECATED void QgsAdvancedDigitizingDockWidget::pointChanged ( const QgsPointXY point)
signal

Sometimes a constraint may change the current point out of a mouse event.

This happens normally when a constraint is toggled.

Parameters
pointThe last known digitizing point. Can be used to emulate a mouse event.
Deprecated:
since QGIS 3.22. No longer used, will be removed in QGIS 4.0. Use pointChangedV2 instead.

◆ pointChangedV2

void QgsAdvancedDigitizingDockWidget::pointChangedV2 ( const QgsPoint point)
signal

Sometimes a constraint may change the current point out of a mouse event.

This happens normally when a constraint is toggled.

Parameters
pointThe last known digitizing point. Can be used to emulate a mouse event.
Since
QGIS 3.22

◆ pointsCount()

int QgsAdvancedDigitizingDockWidget::pointsCount ( ) const
inline

The number of points in the CAD point helper list.

Definition at line 460 of file qgsadvanceddigitizingdockwidget.h.

◆ popWarning

void QgsAdvancedDigitizingDockWidget::popWarning ( )
signal

Remove any previously emitted warnings (if any)

◆ previousPoint()

Q_DECL_DEPRECATED QgsPointXY QgsAdvancedDigitizingDockWidget::previousPoint ( bool *  exists = nullptr) const
inline

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 QGIS 3.22. Use previousPointV2() instead.

Definition at line 440 of file qgsadvanceddigitizingdockwidget.h.

◆ previousPointV2()

QgsPoint QgsAdvancedDigitizingDockWidget::previousPointV2 ( bool *  exists = nullptr) const

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).

Definition at line 2115 of file qgsadvanceddigitizingdockwidget.cpp.

◆ pushWarning

void QgsAdvancedDigitizingDockWidget::pushWarning ( const QString &  message)
signal

Push a warning.

Parameters
messageAn informative message

◆ relativeAngleChanged

void QgsAdvancedDigitizingDockWidget::relativeAngleChanged ( bool  relative)
signal

Emitted whenever the angleX parameter is toggled between absolute and relative.

Could be used by widgets that must reflect the current advanced digitizing state.

Parameters
relativeWhether the angle parameter is relative or not.
Note
unstable API (will likely change)
Since
QGIS 3.8

◆ relativeMChanged

void QgsAdvancedDigitizingDockWidget::relativeMChanged ( bool  relative)
signal

Emitted whenever the M parameter is toggled between absolute and relative.

Could be used by widgets that must reflect the current advanced digitizing state.

Parameters
relativeWhether the M parameter is relative or not.
Note
unstable API (will likely change)
Since
QGIS 3.22

◆ relativeXChanged

void QgsAdvancedDigitizingDockWidget::relativeXChanged ( bool  relative)
signal

Emitted whenever the X parameter is toggled between absolute and relative.

Could be used by widgets that must reflect the current advanced digitizing state.

Parameters
relativeWhether the X parameter is relative or not.
Note
unstable API (will likely change)
Since
QGIS 3.8

◆ relativeYChanged

void QgsAdvancedDigitizingDockWidget::relativeYChanged ( bool  relative)
signal

Emitted whenever the Y parameter is toggled between absolute and relative.

Could be used by widgets that must reflect the current advanced digitizing state.

Parameters
relativeWhether the Y parameter is relative or not.
Note
unstable API (will likely change)
Since
QGIS 3.8

◆ relativeZChanged

void QgsAdvancedDigitizingDockWidget::relativeZChanged ( bool  relative)
signal

Emitted whenever the Z parameter is toggled between absolute and relative.

Could be used by widgets that must reflect the current advanced digitizing state.

Parameters
relativeWhether the Z parameter is relative or not.
Note
unstable API (will likely change)
Since
QGIS 3.22

◆ releaseLocks()

void QgsAdvancedDigitizingDockWidget::releaseLocks ( bool  releaseRepeatingLocks = true)

unlock all constraints

Parameters
releaseRepeatingLocksset to false to preserve the lock for any constraints set to repeating lock mode

Definition at line 706 of file qgsadvanceddigitizingdockwidget.cpp.

◆ removePreviousPoint()

void QgsAdvancedDigitizingDockWidget::removePreviousPoint ( )

Removes previous point in the CAD point list.

Since
QGIS 3.8

Definition at line 1910 of file qgsadvanceddigitizingdockwidget.cpp.

◆ setAngle()

void QgsAdvancedDigitizingDockWidget::setAngle ( const QString &  value,
WidgetSetMode  mode 
)

Set the angle value on the widget.

Can be used to set constraints by external widgets.

Parameters
modeWhat type of interaction to emulate
valueThe value (as a QString, as it could be an expression)
Note
unstable API (will likely change)
Since
QGIS 3.8

Definition at line 450 of file qgsadvanceddigitizingdockwidget.cpp.

◆ setDistance()

void QgsAdvancedDigitizingDockWidget::setDistance ( const QString &  value,
WidgetSetMode  mode 
)

Set the distance value on the widget.

Can be used to set constraints by external widgets.

Parameters
modeWhat type of interaction to emulate
valueThe value (as a QString, as it could be an expression)
Note
unstable API (will likely change)
Since
QGIS 3.8

Definition at line 462 of file qgsadvanceddigitizingdockwidget.cpp.

◆ setEnabledM()

void QgsAdvancedDigitizingDockWidget::setEnabledM ( bool  enable)

Sets whether M is enabled.

Since
QGIS 3.22

Definition at line 571 of file qgsadvanceddigitizingdockwidget.cpp.

◆ setEnabledZ()

void QgsAdvancedDigitizingDockWidget::setEnabledZ ( bool  enable)

Sets whether Z is enabled.

Since
QGIS 3.22

Definition at line 558 of file qgsadvanceddigitizingdockwidget.cpp.

◆ setM()

void QgsAdvancedDigitizingDockWidget::setM ( const QString &  value,
WidgetSetMode  mode 
)

Set the M value on the widget.

Can be used to set constraints by external widgets.

Parameters
modeWhat type of interaction to emulate
valueThe value (as a QString, as it could be an expression)
Note
unstable API (will likely change)
Since
QGIS 3.22

Definition at line 433 of file qgsadvanceddigitizingdockwidget.cpp.

◆ setPoints()

void QgsAdvancedDigitizingDockWidget::setPoints ( const QList< QgsPointXY > &  points)

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.

Definition at line 1537 of file qgsadvanceddigitizingdockwidget.cpp.

◆ setX()

void QgsAdvancedDigitizingDockWidget::setX ( const QString &  value,
WidgetSetMode  mode 
)

Set the X value on the widget.

Can be used to set constraints by external widgets.

Parameters
modeWhat type of interaction to emulate
valueThe value (as a QString, as it could be an expression)
Note
unstable API (will likely change)
Since
QGIS 3.8

Definition at line 382 of file qgsadvanceddigitizingdockwidget.cpp.

◆ setY()

void QgsAdvancedDigitizingDockWidget::setY ( const QString &  value,
WidgetSetMode  mode 
)

Set the Y value on the widget.

Can be used to set constraints by external widgets.

Parameters
modeWhat type of interaction to emulate
valueThe value (as a QString, as it could be an expression)
Note
unstable API (will likely change)
Since
QGIS 3.8

Definition at line 399 of file qgsadvanceddigitizingdockwidget.cpp.

◆ setZ()

void QgsAdvancedDigitizingDockWidget::setZ ( const QString &  value,
WidgetSetMode  mode 
)

Set the Z value on the widget.

Can be used to set constraints by external widgets.

Parameters
modeWhat type of interaction to emulate
valueThe value (as a QString, as it could be an expression)
Note
unstable API (will likely change)
Since
QGIS 3.22

Definition at line 416 of file qgsadvanceddigitizingdockwidget.cpp.

◆ snappedSegment()

QList< QgsPointXY > QgsAdvancedDigitizingDockWidget::snappedSegment ( ) const
inline

Snapped to a segment.

Definition at line 470 of file qgsadvanceddigitizingdockwidget.h.

◆ snappedToVertex()

bool QgsAdvancedDigitizingDockWidget::snappedToVertex ( ) const
inline

Is it snapped to a vertex.

Definition at line 465 of file qgsadvanceddigitizingdockwidget.h.

◆ softLockLineExtensionChanged

void QgsAdvancedDigitizingDockWidget::softLockLineExtensionChanged ( bool  locked)
signal

Emitted whenever the soft line extension parameter is locked.

Could be used by widgets that must reflect the current advanced digitizing state.

Note
unstable API (will likely change)
Since
QGIS 3.26

◆ softLockX()

double QgsAdvancedDigitizingDockWidget::softLockX ( ) const
inline

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

Definition at line 349 of file qgsadvanceddigitizingdockwidget.h.

◆ softLockXyChanged

void QgsAdvancedDigitizingDockWidget::softLockXyChanged ( bool  locked)
signal

Emitted whenever the soft x/y extension parameter is locked.

Could be used by widgets that must reflect the current advanced digitizing state.

Note
unstable API (will likely change)
Since
QGIS 3.26

◆ softLockY()

double QgsAdvancedDigitizingDockWidget::softLockY ( ) const
inline

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

Definition at line 352 of file qgsadvanceddigitizingdockwidget.h.

◆ switchZM()

void QgsAdvancedDigitizingDockWidget::switchZM ( )

Determines if Z or M will be enabled.

Since
QGIS 3.22

Definition at line 518 of file qgsadvanceddigitizingdockwidget.cpp.

◆ updateCadPaintItem()

void QgsAdvancedDigitizingDockWidget::updateCadPaintItem ( )

Updates canvas item that displays constraints on the ma.

Definition at line 1878 of file qgsadvanceddigitizingdockwidget.cpp.

◆ updateCurrentPoint()

void QgsAdvancedDigitizingDockWidget::updateCurrentPoint ( const QgsPoint point)

Updates the current point in the CAD point list.

Since
QGIS 3.30.2

Definition at line 1930 of file qgsadvanceddigitizingdockwidget.cpp.

◆ valueAngleChanged

void QgsAdvancedDigitizingDockWidget::valueAngleChanged ( const QString &  value)
signal

Emitted whenever the angle value changes (either the mouse moved, or the user changed the input).

Could be used by widgets that must reflect the current advanced digitizing state.

Note
unstable API (will likely change)
Since
QGIS 3.8

◆ valueBearingChanged

void QgsAdvancedDigitizingDockWidget::valueBearingChanged ( const QString &  value)
signal

Emitted whenever the bearing value changes.

Could be used by widgets that must reflect the current advanced digitizing state.

Note
unstable API (will likely change)
Since
QGIS 3.32

◆ valueCommonAngleSnappingChanged

void QgsAdvancedDigitizingDockWidget::valueCommonAngleSnappingChanged ( double  angle)
signal

Emitted whenever the snapping to common angle option changes, angle = 0 means that the functionality is disabled.

Since
QGIS 3.32

◆ valueDistanceChanged

void QgsAdvancedDigitizingDockWidget::valueDistanceChanged ( const QString &  value)
signal

Emitted whenever the distance value changes (either the mouse moved, or the user changed the input).

Could be used by widgets that must reflect the current advanced digitizing state.

Note
unstable API (will likely change)
Since
QGIS 3.8

◆ valueMChanged

void QgsAdvancedDigitizingDockWidget::valueMChanged ( const QString &  value)
signal

Emitted whenever the M value changes (either the mouse moved, or the user changed the input).

Could be used by widgets that must reflect the current advanced digitizing state.

Note
unstable API (will likely change)
Since
QGIS 3.22

◆ valueXChanged

void QgsAdvancedDigitizingDockWidget::valueXChanged ( const QString &  value)
signal

Emitted whenever the X value changes (either the mouse moved, or the user changed the input).

Could be used by widgets that must reflect the current advanced digitizing state.

Note
unstable API (will likely change)
Since
QGIS 3.8

◆ valueYChanged

void QgsAdvancedDigitizingDockWidget::valueYChanged ( const QString &  value)
signal

Emitted whenever the Y value changes (either the mouse moved, or the user changed the input).

Could be used by widgets that must reflect the current advanced digitizing state.

Note
unstable API (will likely change)
Since
QGIS 3.8

◆ valueZChanged

void QgsAdvancedDigitizingDockWidget::valueZChanged ( const QString &  value)
signal

Emitted whenever the Z value changes (either the mouse moved, or the user changed the input).

Could be used by widgets that must reflect the current advanced digitizing state.

Note
unstable API (will likely change)
Since
QGIS 3.22

Friends And Related Symbol Documentation

◆ TestQgsAdvancedDigitizing

friend class TestQgsAdvancedDigitizing
friend

Definition at line 1092 of file qgsadvanceddigitizingdockwidget.h.

◆ TestQgsAdvancedDigitizingDockWidget

friend class TestQgsAdvancedDigitizingDockWidget
friend

Definition at line 1093 of file qgsadvanceddigitizingdockwidget.h.


The documentation for this class was generated from the following files: