Class: QgsLabeling

class qgis.core.QgsLabeling

Bases: sip.wrapper

Contains constants and enums relating to labeling.

New in version 3.12: Enums

LinePlacementFlag

Bases: enum.IntEnum

class LinePlacementFlag(value)

Bases: enum.IntEnum

Line placement flags, which control how candidates are generated for a linear feature.

  • OnLine: Labels can be placed directly over a line feature.

  • AboveLine: Labels can be placed above a line feature. Unless MapOrientation is also specified this mode respects the direction of the line feature, so a line from right to left labels will have labels placed placed below the line feature.

  • BelowLine: Labels can be placed below a line feature. Unless MapOrientation is also specified this mode respects the direction of the line feature, so a line from right to left labels will have labels placed placed above the line feature.

  • MapOrientation: Signifies that the AboveLine and BelowLine flags should respect the map’s orientation rather than the feature’s orientation. For example, AboveLine will always result in label’s being placed above a line, regardless of the line’s direction.

AboveLine = 2
BelowLine = 4
MapOrientation = 8
OnLine = 1
class LinePlacementFlags

Bases: sip.wrapper

QgsLabeling.LinePlacementFlags(Union[QgsLabeling.LinePlacementFlags, QgsLabeling.LinePlacementFlag]) QgsLabeling.LinePlacementFlags(QgsLabeling.LinePlacementFlags)