Class: QgsAdvancedDigitizingFloater

A widget that floats next to the mouse pointer, and allows interaction with the AdvancedDigitizing feature.

It proxies display and actions to QgsMapToolAdvancedDigitizingDockWidget.

Note

This class is a technology preview and unstable API.

Added in version 3.8.

QgsAdvancedDigitizingFloater

QgsAdvancedDigitizingFloater

List of all members, including inherited members

Class Hierarchy

Inheritance diagram of qgis.gui.QgsAdvancedDigitizingFloater

Base classes

QWidget

QObject

QPaintDevice

Enums

FloaterItem

Available floater items

Methods

FloaterItems

active

Whether the floater is active or not.

changeWeight

Updates the weight value displayed in the floater for NURBSCurve.

enabledChangedWeight

Shows or hides the weight widget in the floater for NURBSCurve.

focusOnWeight

Requests focus on the weight input field for NURBSCurve.

itemMeasurementDisplayType

Returns the measurement display type for a floater item.

itemVisibility

Returns True if the floater item visibility setting is enabled.

setActive

Set whether the floater should be active or not.

setItemMeasurementType

Set whether the measurement display type for a floater item.

setItemVisibility

Set whether the floater item should be visible or not.

Static Methods

itemSupportsMeasurementType

Returns True if a floater item supports display in different Qgis.CadMeasurementDisplayType values.

class qgis.gui.QgsAdvancedDigitizingFloater[source]

Bases: QWidget

__init__(canvas: QgsMapCanvas | None, cadDockWidget: QgsAdvancedDigitizingDockWidget | None)

Create an advanced digitizing floater widget

Parameters:

Added in version 3.8.

class FloaterItem(*values)

Bases: IntFlag

Available floater items

  • XCoordinate: X coordinate

  • YCoordinate: Y coordinate

  • MCoordinate: M coordinate

  • ZCoordinate: Z coordinate

  • Angle: Angle between segments

  • CommonAngleSnapping: Common angles

  • Distance: Distance (segment length)

  • Bearing: Segment bearing

  • Weight: Weight for NURBSCurve

    Added in version 4.0.

  • Area: Total area

    Added in version 4.0.

  • TotalLength: Total length (or perimeter)

    Added in version 4.0.

Angle = 32
Area = 1024
Bearing = 256
CommonAngleSnapping = 64
Distance = 128
MCoordinate = 8
TotalLength = 2048
Weight = 512
XCoordinate = 2
YCoordinate = 4
ZCoordinate = 16
FloaterItems()
active(self) bool[source]

Whether the floater is active or not. Note that the floater may be active but not visible (e.g. if the mouse is not over the canvas).

Added in version 3.8.

Return type:

bool

changeWeight(self, text: str | None)[source]

Updates the weight value displayed in the floater for NURBSCurve.

Parameters:

text (Optional[str]) – The weight value as a string

Added in version 4.0.

enabledChangedWeight(self, enabled: bool)[source]

Shows or hides the weight widget in the floater for NURBSCurve.

Parameters:

enabled (bool) – Whether weight editing is active

Added in version 4.0.

focusOnWeight(self)[source]

Requests focus on the weight input field for NURBSCurve.

Added in version 4.0.

itemMeasurementDisplayType(self, item: QgsAdvancedDigitizingFloater.FloaterItem) Qgis.CadMeasurementDisplayType[source]

Returns the measurement display type for a floater item.

If the item does not support measurement types (see itemSupportsMeasurementType()), Qgis.CadMeasurementDisplayType.Hidden will be returned. For these items use itemVisibility() instead.

Added in version 4.0.

Parameters:

item (QgsAdvancedDigitizingFloater.FloaterItem)

Return type:

Qgis.CadMeasurementDisplayType

static itemSupportsMeasurementType(item: QgsAdvancedDigitizingFloater.FloaterItem) bool[source]

Returns True if a floater item supports display in different Qgis.CadMeasurementDisplayType values.

Added in version 4.0.

Parameters:

item (QgsAdvancedDigitizingFloater.FloaterItem)

Return type:

bool

itemVisibility(self, item: QgsAdvancedDigitizingFloater.FloaterItem) bool[source]

Returns True if the floater item visibility setting is enabled.

Parameters:

item (QgsAdvancedDigitizingFloater.FloaterItem) – floater item

Added in version 3.32.

Return type:

bool

setActive(self, active: bool)[source]

Set whether the floater should be active or not. Note that the floater may be active but not visible (e.g. if the mouse is not over the canvas).

Parameters:

active (bool)

Added in version 3.8.

setItemMeasurementType(self, item: QgsAdvancedDigitizingFloater.FloaterItem, type: Qgis.CadMeasurementDisplayType)[source]

Set whether the measurement display type for a floater item.

Added in version 4.0.

Parameters:
setItemVisibility(self, item: QgsAdvancedDigitizingFloater.FloaterItem, visible: bool)[source]

Set whether the floater item should be visible or not.

Parameters:

Added in version 3.32.