Class: QgsLabelPointSettings¶
- class qgis.core.QgsLabelPointSettings¶
Bases:
sip.wrapper
Contains settings related to how the label engine places and formats labels for point features, or polygon features which are labeled in the “around” or “over” centroid placement modes.
Added in version 3.38:
Methods
Returns the maximum distance which labels are allowed to be from their corresponding points.
Returns the map unit scale for label maximum distance.
Returns the units for label maximum distance.
Returns the ordered list of predefined label positions for points.
Returns the quadrant in which to offset labels from the point.
Sets the maximum
distance
which labels are allowed to be from their corresponding points.Sets the map unit
scale
for label maximum distance.Sets the
unit
for label maximum distance.Sets the ordered list of predefined label positions for points.
Sets the
quadrant
in which to offset labels from the point.Updates the point settings to respect any data defined properties set within the specified
properties
collection.Signals
Attributes
- maximumDistance(self) float ¶
Returns the maximum distance which labels are allowed to be from their corresponding points.
This setting works alongside the standard label offset distance properties to define a permissible range of distances at which labels can be placed from their points.
The default value is 0, which indicates that no maximum is set and the label’s usual distance from point will always be respected.
See also
See also
See also
- Return type:
float
- maximumDistanceMapUnitScale(self) QgsMapUnitScale ¶
Returns the map unit scale for label maximum distance.
See also
See also
See also
- Return type:
- maximumDistanceUnit(self) Qgis.RenderUnit ¶
Returns the units for label maximum distance.
See also
See also
See also
- Return type:
- predefinedPositionOrder(self) List[Qgis.LabelPredefinedPointPosition] ¶
Returns the ordered list of predefined label positions for points.
Positions earlier in the list will be prioritized over later positions. Only used when the placement is set to
Qgis
.LabelPlacement.OrderedPositionsAroundPoint.See also
- Return type:
- quadrant(self) Qgis.LabelQuadrantPosition ¶
Returns the quadrant in which to offset labels from the point.
See also
- Return type:
- setMaximumDistance(self, distance: float)¶
Sets the maximum
distance
which labels are allowed to be from their corresponding points.This setting works alongside the standard label offset distance properties to define a permissible range of distances at which labels can be placed from their points.
Setting
distance
to 0 indicates that no maximum is set and the label’s usual distance from point will always be respected.See also
See also
See also
- Parameters:
distance (float)
- setMaximumDistanceMapUnitScale(self, scale: QgsMapUnitScale)¶
Sets the map unit
scale
for label maximum distance.See also
See also
See also
- Parameters:
scale (QgsMapUnitScale)
- setMaximumDistanceUnit(self, unit: Qgis.RenderUnit)¶
Sets the
unit
for label maximum distance.See also
See also
See also
- Parameters:
unit (Qgis.RenderUnit)
- setPredefinedPositionOrder(self, order: Iterable[Qgis.LabelPredefinedPointPosition])¶
Sets the ordered list of predefined label positions for points.
Positions earlier in the list will be prioritized over later positions. Only used when the placement is set to
Qgis
.LabelPlacement.OrderedPositionsAroundPoint.See also
- Parameters:
order (Iterable[Qgis.LabelPredefinedPointPosition])
- setQuadrant(self, quadrant: Qgis.LabelQuadrantPosition)¶
Sets the
quadrant
in which to offset labels from the point.See also
- Parameters:
quadrant (Qgis.LabelQuadrantPosition)
- staticMetaObject = <PyQt5.QtCore.QMetaObject object>¶
- updateDataDefinedProperties(self, properties: QgsPropertyCollection, context: QgsExpressionContext)¶
Updates the point settings to respect any data defined properties set within the specified
properties
collection.- Parameters:
properties (QgsPropertyCollection)
context (QgsExpressionContext)