QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
Public Member Functions | List of all members
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. More...
 
Qgis::LabelOverlapHandling overlapHandling () const
 Returns the technique used to handle overlapping labels. More...
 
void setAllowDegradedPlacement (bool allow)
 Sets whether labels can be placed in inferior fallback positions if they cannot otherwise be placed. More...
 
void setOverlapHandling (Qgis::LabelOverlapHandling handling)
 Sets the technique used to handle overlapping labels. More...
 
void updateDataDefinedProperties (const QgsPropertyCollection &properties, QgsExpressionContext &context)
 Updates the placement settings to respect any data defined properties set within the specified properties collection. More...
 

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.

◆ 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.

◆ 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.

◆ 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.

◆ 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 22 of file qgslabelplacementsettings.cpp.


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