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

Contains settings related to how the label engine places and formats labels for point features, or polygon features which are labeled in the "around" or "over" centroid placement modes. More...

#include <qgslabelpointsettings.h>

Public Member Functions

double maximumDistance () const
 Returns the maximum distance which labels are allowed to be from their corresponding points.
 
QgsMapUnitScale maximumDistanceMapUnitScale () const
 Returns the map unit scale for label maximum distance.
 
Qgis::RenderUnit maximumDistanceUnit () const
 Returns the units for label maximum distance.
 
QVector< Qgis::LabelPredefinedPointPositionpredefinedPositionOrder () const
 Returns the ordered list of predefined label positions for points.
 
Qgis::LabelQuadrantPosition quadrant () const
 Returns the quadrant in which to offset labels from the point.
 
void setMaximumDistance (double distance)
 Sets the maximum distance which labels are allowed to be from their corresponding points.
 
void setMaximumDistanceMapUnitScale (const QgsMapUnitScale &scale)
 Sets the map unit scale for label maximum distance.
 
void setMaximumDistanceUnit (Qgis::RenderUnit unit)
 Sets the unit for label maximum distance.
 
void setPredefinedPositionOrder (const QVector< Qgis::LabelPredefinedPointPosition > &order)
 Sets the ordered list of predefined label positions for points.
 
void setQuadrant (Qgis::LabelQuadrantPosition quadrant)
 Sets the quadrant in which to offset labels from the point.
 
void updateDataDefinedProperties (const QgsPropertyCollection &properties, QgsExpressionContext &context)
 Updates the point settings to respect any data defined properties set within the specified properties collection.
 

Detailed Description

Contains settings related to how the label engine places and formats labels for point features, or polygon features which are labeled in the "around" or "over" centroid placement modes.

Since
QGIS 3.38

Definition at line 37 of file qgslabelpointsettings.h.

Member Function Documentation

◆ maximumDistance()

double QgsLabelPointSettings::maximumDistance ( ) const
inline

Returns the maximum distance which labels are allowed to be from their corresponding points.

This setting works alongside the standard label offset distance properties to define a permissible range of distances at which labels can be placed from their points.

The default value is 0, which indicates that no maximum is set and the label's usual distance from point will always be respected.

See also
setMaximumDistance()
maximumDistanceUnit()
maximumDistanceMapUnitScale()

Definition at line 96 of file qgslabelpointsettings.h.

◆ maximumDistanceMapUnitScale()

QgsMapUnitScale QgsLabelPointSettings::maximumDistanceMapUnitScale ( ) const
inline

Returns the map unit scale for label maximum distance.

See also
setMaximumDistanceMapUnitScale()
maximumDistance()
maximumDistanceUnit()

Definition at line 138 of file qgslabelpointsettings.h.

◆ maximumDistanceUnit()

Qgis::RenderUnit QgsLabelPointSettings::maximumDistanceUnit ( ) const
inline

Returns the units for label maximum distance.

See also
setMaximumDistanceUnit()
maximumDistance()
maximumDistanceMapUnitScale()

Definition at line 120 of file qgslabelpointsettings.h.

◆ predefinedPositionOrder()

QVector< Qgis::LabelPredefinedPointPosition > QgsLabelPointSettings::predefinedPositionOrder ( ) const
inline

Returns the ordered list of predefined label positions for points.

Positions earlier in the list will be prioritized over later positions. Only used when the placement is set to Qgis::LabelPlacement::OrderedPositionsAroundPoint.

See also
setPredefinedPositionOrder()

Definition at line 71 of file qgslabelpointsettings.h.

◆ quadrant()

Qgis::LabelQuadrantPosition QgsLabelPointSettings::quadrant ( ) const
inline

Returns the quadrant in which to offset labels from the point.

See also
setQuadrant()

Definition at line 54 of file qgslabelpointsettings.h.

◆ setMaximumDistance()

void QgsLabelPointSettings::setMaximumDistance ( double  distance)
inline

Sets the maximum distance which labels are allowed to be from their corresponding points.

This setting works alongside the standard label offset distance properties to define a permissible range of distances at which labels can be placed from their points.

Setting distance to 0 indicates that no maximum is set and the label's usual distance from point will always be respected.

See also
maximumDistance()
maximumDistanceUnit()
maximumDistanceMapUnitScale()

Definition at line 111 of file qgslabelpointsettings.h.

◆ setMaximumDistanceMapUnitScale()

void QgsLabelPointSettings::setMaximumDistanceMapUnitScale ( const QgsMapUnitScale scale)
inline

Sets the map unit scale for label maximum distance.

See also
maximumDistanceMapUnitScale()
maximumDistance()
maximumDistanceUnit()

Definition at line 147 of file qgslabelpointsettings.h.

◆ setMaximumDistanceUnit()

void QgsLabelPointSettings::setMaximumDistanceUnit ( Qgis::RenderUnit  unit)
inline

Sets the unit for label maximum distance.

See also
maximumDistanceUnit()
maximumDistance()
maximumDistanceMapUnitScale()

Definition at line 129 of file qgslabelpointsettings.h.

◆ setPredefinedPositionOrder()

void QgsLabelPointSettings::setPredefinedPositionOrder ( const QVector< Qgis::LabelPredefinedPointPosition > &  order)
inline

Sets the ordered list of predefined label positions for points.

Positions earlier in the list will be prioritized over later positions. Only used when the placement is set to Qgis::LabelPlacement::OrderedPositionsAroundPoint.

See also
predefinedPositionOrder()

Definition at line 81 of file qgslabelpointsettings.h.

◆ setQuadrant()

void QgsLabelPointSettings::setQuadrant ( Qgis::LabelQuadrantPosition  quadrant)
inline

Sets the quadrant in which to offset labels from the point.

See also
quadrant()

Definition at line 61 of file qgslabelpointsettings.h.

◆ updateDataDefinedProperties()

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

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

Definition at line 23 of file qgslabelpointsettings.cpp.


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