QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Contains settings related to how the label engine places and formats labels for line features (or polygon features which are labeled in a "perimeter" style mode). More...
#include <qgslabellinesettings.h>
Public Types | |
enum | AnchorClipping : int { AnchorClipping::UseVisiblePartsOfLine, AnchorClipping::UseEntireLine } |
Clipping behavior for line anchor calculation. More... | |
enum | AnchorTextPoint : int { AnchorTextPoint::StartOfText, AnchorTextPoint::CenterOfText, AnchorTextPoint::EndOfText, AnchorTextPoint::FollowPlacement } |
Anchor point of label text. More... | |
enum | AnchorType : int { AnchorType::HintOnly, AnchorType::Strict } |
Line anchor types. More... | |
enum | DirectionSymbolPlacement : int { DirectionSymbolPlacement::SymbolLeftRight, DirectionSymbolPlacement::SymbolAbove, DirectionSymbolPlacement::SymbolBelow } |
Placement options for direction symbols. More... | |
Public Member Functions | |
bool | addDirectionSymbol () const |
Returns true if '<' or '>' (or custom strings set via leftDirectionSymbol and rightDirectionSymbol) will be automatically added to the label text, pointing in the direction of the line or polygon ring. More... | |
AnchorClipping | anchorClipping () const |
Returns the line anchor clipping mode, which dictates how line strings are clipped before calculating the line anchor placement. More... | |
AnchorTextPoint | anchorTextPoint () const |
Returns the line anchor text point, which dictates which part of the label text should be placed at the lineAnchorPercent(). More... | |
AnchorType | anchorType () const |
Returns the line anchor type, which dictates how the lineAnchorPercent() setting is handled. More... | |
DirectionSymbolPlacement | directionSymbolPlacement () const |
Returns the placement for direction symbols. More... | |
QString | leftDirectionSymbol () const |
Returns the string to use for left direction arrows. More... | |
double | lineAnchorPercent () const |
Returns the percent along the line at which labels should be placed. More... | |
bool | mergeLines () const |
Returns true if connected line features with identical label text should be merged prior to generating label positions. More... | |
double | overrunDistance () const |
Returns the distance which labels are allowed to overrun past the start or end of line features. More... | |
QgsMapUnitScale | overrunDistanceMapUnitScale () const |
Returns the map unit scale for label overrun distance. More... | |
QgsUnitTypes::RenderUnit | overrunDistanceUnit () const |
Returns the units for label overrun distance. More... | |
QgsLabeling::LinePlacementFlags | placementFlags () const |
Returns the line placement flags, which dictate how line labels can be placed above or below the lines. More... | |
bool | reverseDirectionSymbol () const |
Returns true if direction symbols should be reversed. More... | |
QString | rightDirectionSymbol () const |
Returns the string to use for right direction arrows. More... | |
void | setAddDirectionSymbol (bool enabled) |
Sets whether '<' or '>' (or custom strings set via leftDirectionSymbol and rightDirectionSymbol) will be automatically added to the label text, pointing in the direction of the line or polygon ring. More... | |
void | setAnchorClipping (AnchorClipping clipping) |
Sets the line anchor clipping mode, which dictates how line strings are clipped before calculating the line anchor placement. More... | |
void | setAnchorTextPoint (AnchorTextPoint point) |
Sets the line anchor text point, which dictates which part of the label text should be placed at the lineAnchorPercent(). More... | |
void | setAnchorType (AnchorType type) |
Sets the line anchor type, which dictates how the lineAnchorPercent() setting is handled. More... | |
void | setDirectionSymbolPlacement (DirectionSymbolPlacement placement) |
Sets the placement for direction symbols. More... | |
void | setLeftDirectionSymbol (const QString &symbol) |
Sets the string to use for left direction arrows. More... | |
void | setLineAnchorPercent (double percent) |
Sets the percent along the line at which labels should be placed. More... | |
void | setMergeLines (bool merge) |
Sets whether connected line features with identical label text should be merged prior to generating label positions. More... | |
void | setOverrunDistance (double distance) |
Sets the distance which labels are allowed to overrun past the start or end of line features. More... | |
void | setOverrunDistanceMapUnitScale (const QgsMapUnitScale &scale) |
Sets the map unit scale for label overrun distance. More... | |
void | setOverrunDistanceUnit (const QgsUnitTypes::RenderUnit &unit) |
Sets the unit for label overrun distance. More... | |
void | setPlacementFlags (QgsLabeling::LinePlacementFlags flags) |
Returns the line placement flags, which dictate how line labels can be placed above or below the lines. More... | |
void | setReverseDirectionSymbol (bool reversed) |
Sets whether the direction symbols should be reversed. More... | |
void | setRightDirectionSymbol (const QString &symbol) |
Sets the string to use for right direction arrows. More... | |
void | updateDataDefinedProperties (const QgsPropertyCollection &properties, QgsExpressionContext &context) |
Updates the thinning settings to respect any data defined properties set within the specified properties collection. More... | |
Contains settings related to how the label engine places and formats labels for line features (or polygon features which are labeled in a "perimeter" style mode).
Definition at line 39 of file qgslabellinesettings.h.
|
strong |
Clipping behavior for line anchor calculation.
Definition at line 71 of file qgslabellinesettings.h.
|
strong |
Anchor point of label text.
Enumerator | |
---|---|
StartOfText | Anchor using start of text. |
CenterOfText | Anchor using center of text. |
EndOfText | Anchor using end of text. |
FollowPlacement | Automatically set the anchor point based on the lineAnchorPercent() value. Values <25% will use the start of text, values > 75% will use the end of text, and values in between will use the center of the text. |
Definition at line 83 of file qgslabellinesettings.h.
|
strong |
Line anchor types.
Definition at line 59 of file qgslabellinesettings.h.
|
strong |
Placement options for direction symbols.
Enumerator | |
---|---|
SymbolLeftRight | Place direction symbols on left/right of label. |
SymbolAbove | Place direction symbols on above label. |
SymbolBelow | Place direction symbols on below label. |
Definition at line 48 of file qgslabellinesettings.h.
|
inline |
Returns true
if '<' or '>' (or custom strings set via leftDirectionSymbol and rightDirectionSymbol) will be automatically added to the label text, pointing in the direction of the line or polygon ring.
Definition at line 141 of file qgslabellinesettings.h.
|
inline |
Returns the line anchor clipping mode, which dictates how line strings are clipped before calculating the line anchor placement.
Definition at line 334 of file qgslabellinesettings.h.
|
inline |
Returns the line anchor text point, which dictates which part of the label text should be placed at the lineAnchorPercent().
Definition at line 356 of file qgslabellinesettings.h.
|
inline |
Returns the line anchor type, which dictates how the lineAnchorPercent() setting is handled.
Definition at line 312 of file qgslabellinesettings.h.
|
inline |
Returns the placement for direction symbols.
This setting controls whether to place direction symbols to the left/right, above or below label.
Definition at line 214 of file qgslabellinesettings.h.
|
inline |
Returns the string to use for left direction arrows.
Definition at line 163 of file qgslabellinesettings.h.
|
inline |
Returns the percent along the line at which labels should be placed.
By default, this is 0.5 which indicates that labels should be placed as close to the center of the line as possible. A value of 0.0 indicates that the labels should be placed as close to the start of the line as possible, while a value of 1.0 pushes labels towards the end of the line.
Definition at line 287 of file qgslabellinesettings.h.
|
inline |
Returns true
if connected line features with identical label text should be merged prior to generating label positions.
Definition at line 114 of file qgslabellinesettings.h.
|
inline |
Returns the distance which labels are allowed to overrun past the start or end of line features.
Definition at line 232 of file qgslabellinesettings.h.
|
inline |
Returns the map unit scale for label overrun distance.
Definition at line 264 of file qgslabellinesettings.h.
|
inline |
Returns the units for label overrun distance.
Definition at line 248 of file qgslabellinesettings.h.
|
inline |
Returns the line placement flags, which dictate how line labels can be placed above or below the lines.
Definition at line 98 of file qgslabellinesettings.h.
|
inline |
Returns true
if direction symbols should be reversed.
Definition at line 197 of file qgslabellinesettings.h.
|
inline |
Returns the string to use for right direction arrows.
Definition at line 181 of file qgslabellinesettings.h.
|
inline |
Sets whether '<' or '>' (or custom strings set via leftDirectionSymbol and rightDirectionSymbol) will be automatically added to the label text, pointing in the direction of the line or polygon ring.
Definition at line 154 of file qgslabellinesettings.h.
|
inline |
Sets the line anchor clipping mode, which dictates how line strings are clipped before calculating the line anchor placement.
Definition at line 346 of file qgslabellinesettings.h.
|
inline |
Sets the line anchor text point, which dictates which part of the label text should be placed at the lineAnchorPercent().
Definition at line 366 of file qgslabellinesettings.h.
|
inline |
Sets the line anchor type, which dictates how the lineAnchorPercent() setting is handled.
Definition at line 322 of file qgslabellinesettings.h.
|
inline |
Sets the placement for direction symbols.
This setting controls whether to place direction symbols to the left/right, above or below label.
Definition at line 224 of file qgslabellinesettings.h.
|
inline |
Sets the string to use for left direction arrows.
Definition at line 172 of file qgslabellinesettings.h.
|
inline |
Sets the percent along the line at which labels should be placed.
By default, this is 0.5 which indicates that labels should be placed as close to the center of the line as possible. A value of 0.0 indicates that the labels should be placed as close to the start of the line as possible, while a value of 1.0 pushes labels towards the end of the line.
Definition at line 302 of file qgslabellinesettings.h.
|
inline |
Sets whether connected line features with identical label text should be merged prior to generating label positions.
Definition at line 122 of file qgslabellinesettings.h.
|
inline |
Sets the distance which labels are allowed to overrun past the start or end of line features.
Definition at line 240 of file qgslabellinesettings.h.
|
inline |
Sets the map unit scale for label overrun distance.
Definition at line 272 of file qgslabellinesettings.h.
|
inline |
Sets the unit for label overrun distance.
Definition at line 256 of file qgslabellinesettings.h.
|
inline |
Returns the line placement flags, which dictate how line labels can be placed above or below the lines.
Definition at line 106 of file qgslabellinesettings.h.
|
inline |
Sets whether the direction symbols should be reversed.
Definition at line 204 of file qgslabellinesettings.h.
|
inline |
Sets the string to use for right direction arrows.
Definition at line 190 of file qgslabellinesettings.h.
void QgsLabelLineSettings::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 23 of file qgslabellinesettings.cpp.