QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
Loading...
Searching...
No Matches
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.
 
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 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 updateDataDefinedProperties (const QgsPropertyCollection &properties, QgsExpressionContext &context)
 Updates the placement settings to respect any data defined properties set within the specified properties collection.
 

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.

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

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

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