QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsLabelThinningSettings Class Reference

Contains settings related to how the label engine removes candidate label positions and reduces the number of displayed labels. More...

#include <qgslabelthinningsettings.h>

Public Member Functions

bool limitNumberOfLabelsEnabled () const
 Returns true if the number of labels drawn for the layer should be limited.
 
int maximumNumberLabels () const
 Returns the maximum number of labels which should be drawn for this layer.
 
double minimumFeatureSize () const
 Returns the minimum feature size (in millimeters) for a feature to be labelled.
 
void setLimitNumberLabelsEnabled (bool enabled)
 Sets whether the the number of labels drawn for the layer should be limited.
 
void setMaximumNumberLabels (int number)
 Sets the maximum number of labels which should be drawn for this layer.
 
void setMinimumFeatureSize (double size)
 Sets the minimum feature size (in millimeters) for a feature to be labelled.
 
void updateDataDefinedProperties (const QgsPropertyCollection &properties, QgsExpressionContext &context)
 Updates the thinning settings to respect any data defined properties set within the specified properties collection.
 

Detailed Description

Contains settings related to how the label engine removes candidate label positions and reduces the number of displayed labels.

Since
QGIS 3.12

Definition at line 34 of file qgslabelthinningsettings.h.

Member Function Documentation

◆ limitNumberOfLabelsEnabled()

bool QgsLabelThinningSettings::limitNumberOfLabelsEnabled ( ) const
inline

Returns true if the number of labels drawn for the layer should be limited.

See also
maximumNumberLabels()
setLimitNumberLabelsEnabled()

Definition at line 43 of file qgslabelthinningsettings.h.

◆ maximumNumberLabels()

int QgsLabelThinningSettings::maximumNumberLabels ( ) const
inline

Returns the maximum number of labels which should be drawn for this layer.

This only has an effect if limitNumberOfLabelsEnabled() is true.

See also
limitNumberOfLabelsEnabled()
setMaximumNumberLabels()

Definition at line 58 of file qgslabelthinningsettings.h.

◆ minimumFeatureSize()

double QgsLabelThinningSettings::minimumFeatureSize ( ) const
inline

Returns the minimum feature size (in millimeters) for a feature to be labelled.

See also
setMinimumFeatureSize()

Definition at line 72 of file qgslabelthinningsettings.h.

◆ setLimitNumberLabelsEnabled()

void QgsLabelThinningSettings::setLimitNumberLabelsEnabled ( bool  enabled)
inline

Sets whether the the number of labels drawn for the layer should be limited.

See also
setMaximumNumberLabels()
limitNumberOfLabelsEnabled()

Definition at line 50 of file qgslabelthinningsettings.h.

◆ setMaximumNumberLabels()

void QgsLabelThinningSettings::setMaximumNumberLabels ( int  number)
inline

Sets the maximum number of labels which should be drawn for this layer.

This only has an effect if limitNumberOfLabelsEnabled() is true.

See also
setLimitNumberLabelsEnabled()
maximumNumberLabels()

Definition at line 66 of file qgslabelthinningsettings.h.

◆ setMinimumFeatureSize()

void QgsLabelThinningSettings::setMinimumFeatureSize ( double  size)
inline

Sets the minimum feature size (in millimeters) for a feature to be labelled.

See also
minimumFeatureSize()

Definition at line 78 of file qgslabelthinningsettings.h.

◆ updateDataDefinedProperties()

void QgsLabelThinningSettings::updateDataDefinedProperties ( const QgsPropertyCollection properties,
QgsExpressionContext context 
)

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

Definition at line 22 of file qgslabelthinningsettings.cpp.


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