QGIS API Documentation 3.99.0-Master (e9821da5c6b)
Loading...
Searching...
No Matches
QgsLabelPlacementSettings Class Reference

Contains general settings related to how labels are placed. More...

#include <qgslabelplacementsettings.h>

Public Member Functions

bool allowDegradedPlacement () const
 Returns true if labels can be placed in inferior fallback positions if they cannot otherwise be placed.
Qgis::MultiPartLabelingBehavior multiPartBehavior () const
 Returns the multipart labeling behavior.
Qgis::LabelOverlapHandling overlapHandling () const
 Returns the technique used to handle overlapping labels.
Qgis::LabelPrioritization prioritization () const
 Returns the label prioritization technique.
void setAllowDegradedPlacement (bool allow)
 Sets whether labels can be placed in inferior fallback positions if they cannot otherwise be placed.
void setMultiPartBehavior (Qgis::MultiPartLabelingBehavior behavior)
 Sets the multipart labeling behavior.
void setOverlapHandling (Qgis::LabelOverlapHandling handling)
 Sets the technique used to handle overlapping labels.
void setPrioritization (Qgis::LabelPrioritization prioritization)
 Sets the technique used to prioritize labels.
void setWhitespaceCollisionHandling (Qgis::LabelWhitespaceCollisionHandling handling)
 Sets the whitespace collision handling.
void updateDataDefinedProperties (const QgsPropertyCollection &properties, QgsExpressionContext &context)
 Updates the placement settings to respect any data defined properties set within the specified properties collection.
Qgis::LabelWhitespaceCollisionHandling whitespaceCollisionHandling () const
 Returns the whitespace collision handling.

Detailed Description

Contains general settings related to how labels are placed.

Since
QGIS 3.26

Definition at line 34 of file qgslabelplacementsettings.h.

Member Function Documentation

◆ allowDegradedPlacement()

bool QgsLabelPlacementSettings::allowDegradedPlacement ( ) const
inline

Returns true if labels can be placed in inferior fallback positions if they cannot otherwise be placed.

For instance, this will permit a curved line label to fallback to a horizontal label at the end of the line if the label cannot otherwise be placed on the line in a curved manner.

See also
setAllowDegradedPlacement()

Definition at line 59 of file qgslabelplacementsettings.h.

◆ multiPartBehavior()

Qgis::MultiPartLabelingBehavior QgsLabelPlacementSettings::multiPartBehavior ( ) const
inline

Returns the multipart labeling behavior.

See also
setMultiPartBehavior()
Since
QGIS 4.0

Definition at line 97 of file qgslabelplacementsettings.h.

◆ overlapHandling()

Qgis::LabelOverlapHandling QgsLabelPlacementSettings::overlapHandling ( ) const
inline

Returns the technique used to handle overlapping labels.

See also
setOverlapHandling()

Definition at line 42 of file qgslabelplacementsettings.h.

◆ prioritization()

Qgis::LabelPrioritization QgsLabelPlacementSettings::prioritization ( ) const
inline

Returns the label prioritization technique.

See also
setPrioritization()
Since
QGIS 3.38

Definition at line 79 of file qgslabelplacementsettings.h.

◆ setAllowDegradedPlacement()

void QgsLabelPlacementSettings::setAllowDegradedPlacement ( bool allow)
inline

Sets whether labels can be placed in inferior fallback positions if they cannot otherwise be placed.

For instance, this will permit a curved line label to fallback to a horizontal label at the end of the line if the label cannot otherwise be placed on the line in a curved manner.

See also
allowDegradedPlacement()

Definition at line 70 of file qgslabelplacementsettings.h.

◆ setMultiPartBehavior()

void QgsLabelPlacementSettings::setMultiPartBehavior ( Qgis::MultiPartLabelingBehavior behavior)
inline

Sets the multipart labeling behavior.

See also
multiPartBehavior()
Since
QGIS 4.0

Definition at line 106 of file qgslabelplacementsettings.h.

◆ setOverlapHandling()

void QgsLabelPlacementSettings::setOverlapHandling ( Qgis::LabelOverlapHandling handling)
inline

Sets the technique used to handle overlapping labels.

See also
overlapHandling()

Definition at line 48 of file qgslabelplacementsettings.h.

◆ setPrioritization()

void QgsLabelPlacementSettings::setPrioritization ( Qgis::LabelPrioritization prioritization)
inline

Sets the technique used to prioritize labels.

See also
prioritization()
Since
QGIS 3.38

Definition at line 88 of file qgslabelplacementsettings.h.

◆ setWhitespaceCollisionHandling()

void QgsLabelPlacementSettings::setWhitespaceCollisionHandling ( Qgis::LabelWhitespaceCollisionHandling handling)
inline

Sets the whitespace collision handling.

See also
whitespaceCollisionHandling()
Since
QGIS 4.0

Definition at line 124 of file qgslabelplacementsettings.h.

◆ updateDataDefinedProperties()

void QgsLabelPlacementSettings::updateDataDefinedProperties ( const QgsPropertyCollection & properties,
QgsExpressionContext & context )

Updates the placement settings to respect any data defined properties set within the specified properties collection.

Definition at line 26 of file qgslabelplacementsettings.cpp.

◆ whitespaceCollisionHandling()

Qgis::LabelWhitespaceCollisionHandling QgsLabelPlacementSettings::whitespaceCollisionHandling ( ) const
inline

Returns the whitespace collision handling.

See also
setWhitespaceCollisionHandling()
Since
QGIS 4.0

Definition at line 115 of file qgslabelplacementsettings.h.


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