Class: QgsLabelingEngineRuleMinimumDistanceLabelToLabel¶
A labeling engine rule which prevents labels being placed too close to labels from a different layer.
Added in version 3.40.
Class Hierarchy¶
Base classes¶
Abstract base class for labeling engine rules. |
Methods
Returns the minimum permitted distance between labels from the |
|
Returns the units for the distance between labels from the |
|
Returns the scaling for the distance between labels from the |
|
Returns the layer providing the labels. |
|
Sets the minimum permitted distance between labels from the |
|
Sets the unit for the distance between labels from the |
|
Sets the scale for the distance between labels from the |
|
Sets the layer providing the labels. |
|
Sets the layer providing the labels which labels must be distant from. |
|
Returns the layer providing the labels which labels must be distant from. |
- class qgis.core.QgsLabelingEngineRuleMinimumDistanceLabelToLabel[source]¶
Bases:
QgsAbstractLabelingEngineRule
- distance(self) float [source]¶
Returns the minimum permitted distance between labels from the
labeledLayer()
and the labels from thetargetLayer()
.See also
See also
- Return type:
float
- distanceUnit(self) Qgis.RenderUnit [source]¶
Returns the units for the distance between labels from the
labeledLayer()
and the labels from thetargetLayer()
.See also
See also
- Return type:
- distanceUnitScale(self) QgsMapUnitScale ¶
Returns the scaling for the distance between labels from the
labeledLayer()
and the labels from thetargetLayer()
.See also
See also
- Return type:
- labeledLayer(self) QgsMapLayer | None [source]¶
Returns the layer providing the labels.
See also
- Return type:
Optional[QgsMapLayer]
- setDistance(self, distance: float)[source]¶
Sets the minimum permitted
distance
between labels from thelabeledLayer()
and the labels from thetargetLayer()
.See also
See also
- Parameters:
distance (float)
- setDistanceUnit(self, unit: Qgis.RenderUnit)[source]¶
Sets the
unit
for the distance between labels from thelabeledLayer()
and the labels from thetargetLayer()
.See also
See also
- Parameters:
unit (Qgis.RenderUnit)
- setDistanceUnitScale(self, scale: QgsMapUnitScale)[source]¶
Sets the
scale
for the distance between labels from thelabeledLayer()
and the labels from thetargetLayer()
.See also
See also
- Parameters:
scale (QgsMapUnitScale)
- setLabeledLayer(self, layer: QgsMapLayer | None)[source]¶
Sets the
layer
providing the labels.See also
- Parameters:
layer (Optional[QgsMapLayer])
- setTargetLayer(self, layer: QgsMapLayer | None)[source]¶
Sets the
layer
providing the labels which labels must be distant from.See also
- Parameters:
layer (Optional[QgsMapLayer])
- targetLayer(self) QgsMapLayer | None [source]¶
Returns the layer providing the labels which labels must be distant from.
See also
- Return type:
Optional[QgsMapLayer]