QGIS API Documentation 3.43.0-Master (e01d6d7c4c0)
|
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 | allowDuplicateRemoval () const |
Returns whether duplicate label removal is permitted for this layer. | |
double | labelMarginDistance () const |
Returns the minimum distance to other labels (i.e. | |
const QgsMapUnitScale & | labelMarginDistanceMapUnitScale () const |
Returns the map unit scale for the minimum distance to other labels. | |
Qgis::RenderUnit | labelMarginDistanceUnit () const |
Returns the units for the minimum distance to other labels. | |
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 | minimumDistanceToDuplicate () const |
Returns the minimum distance to labels with duplicate text. | |
const QgsMapUnitScale & | minimumDistanceToDuplicateMapUnitScale () const |
Returns the map unit scale for the minimum distance to labels with duplicate text. | |
Qgis::RenderUnit | minimumDistanceToDuplicateUnit () const |
Returns the units for the minimum distance to labels with duplicate text. | |
double | minimumFeatureSize () const |
Returns the minimum feature size (in millimeters) for a feature to be labelled. | |
void | setAllowDuplicateRemoval (bool allow) |
Sets whether duplicate label removal is permitted for this layer. | |
void | setLabelMarginDistance (double distance) |
Sets the minimum distance to other labels (i.e. | |
void | setLabelMarginDistanceMapUnitScale (const QgsMapUnitScale &scale) |
Sets the map unit scale for the minimum distance to other labels. | |
void | setLabelMarginDistanceUnit (Qgis::RenderUnit unit) |
Sets the unit for the minimum distance to other labels. | |
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 | setMinimumDistanceToDuplicate (double distance) |
Sets the minimum distance to labels with duplicate text. | |
void | setMinimumDistanceToDuplicateMapUnitScale (const QgsMapUnitScale &scale) |
Sets the map unit scale for the minimum distance to labels with duplicate text. | |
void | setMinimumDistanceToDuplicateUnit (Qgis::RenderUnit unit) |
Sets the unit for the minimum distance to labels with duplicate text. | |
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. | |
Static Public Attributes | |
static constexpr double | DEFAULT_MINIMUM_DISTANCE_TO_DUPLICATE = 20 |
Default minimum distance to duplicate labels. | |
Contains settings related to how the label engine removes candidate label positions and reduces the number of displayed labels.
Definition at line 35 of file qgslabelthinningsettings.h.
|
inline |
Returns whether duplicate label removal is permitted for this layer.
Definition at line 236 of file qgslabelthinningsettings.h.
|
inline |
Returns the minimum distance to other labels (i.e.
the minimum space/margin around labels).
Units are specified through labelMarginDistanceUnit().
Definition at line 91 of file qgslabelthinningsettings.h.
|
inline |
Returns the map unit scale for the minimum distance to other labels.
Definition at line 145 of file qgslabelthinningsettings.h.
|
inline |
Returns the units for the minimum distance to other labels.
Definition at line 123 of file qgslabelthinningsettings.h.
|
inline |
Returns true
if the number of labels drawn for the layer should be limited.
Definition at line 44 of file qgslabelthinningsettings.h.
|
inline |
Returns the maximum number of labels which should be drawn for this layer.
This only has an effect if limitNumberOfLabelsEnabled() is true
.
Definition at line 59 of file qgslabelthinningsettings.h.
|
inline |
Returns the minimum distance to labels with duplicate text.
Units are specified through minimumDistanceToDuplicateUnit().
true
.Definition at line 164 of file qgslabelthinningsettings.h.
|
inline |
Returns the map unit scale for the minimum distance to labels with duplicate text.
true
.Definition at line 228 of file qgslabelthinningsettings.h.
|
inline |
Returns the units for the minimum distance to labels with duplicate text.
true
.Definition at line 202 of file qgslabelthinningsettings.h.
|
inline |
Returns the minimum feature size (in millimeters) for a feature to be labelled.
Definition at line 73 of file qgslabelthinningsettings.h.
|
inline |
Sets whether duplicate label removal is permitted for this layer.
Definition at line 244 of file qgslabelthinningsettings.h.
|
inline |
Sets the minimum distance to other labels (i.e.
the minimum space/margin around labels).
Units are specified through setLabelMarginDistanceUnit().
Definition at line 103 of file qgslabelthinningsettings.h.
|
inline |
Sets the map unit scale for the minimum distance to other labels.
Definition at line 134 of file qgslabelthinningsettings.h.
|
inline |
Sets the unit for the minimum distance to other labels.
Definition at line 113 of file qgslabelthinningsettings.h.
|
inline |
Sets whether the the number of labels drawn for the layer should be limited.
Definition at line 51 of file qgslabelthinningsettings.h.
|
inline |
Sets the maximum number of labels which should be drawn for this layer.
This only has an effect if limitNumberOfLabelsEnabled() is true
.
Definition at line 67 of file qgslabelthinningsettings.h.
|
inline |
Sets the minimum distance to labels with duplicate text.
Units are specified through setMinimumDistanceToDuplicateUnit().
true
.Definition at line 178 of file qgslabelthinningsettings.h.
|
inline |
Sets the map unit scale for the minimum distance to labels with duplicate text.
true
.Definition at line 215 of file qgslabelthinningsettings.h.
|
inline |
Sets the unit for the minimum distance to labels with duplicate text.
true
.Definition at line 190 of file qgslabelthinningsettings.h.
|
inline |
Sets the minimum feature size (in millimeters) for a feature to be labelled.
Definition at line 79 of file qgslabelthinningsettings.h.
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.
|
staticconstexpr |
Default minimum distance to duplicate labels.
Definition at line 149 of file qgslabelthinningsettings.h.