QGIS API Documentation 3.41.0-Master (af5edcb665c)
|
PAL labeling utilities. More...
#include <qgspallabeling.h>
Static Public Member Functions | |
static bool | geometryRequiresPreparation (const QgsGeometry &geometry, QgsRenderContext &context, const QgsCoordinateTransform &ct, const QgsGeometry &clipGeometry=QgsGeometry(), bool mergeLines=false) |
Checks whether a geometry requires preparation before registration with PAL. | |
static QgsGeometry | prepareGeometry (const QgsGeometry &geometry, QgsRenderContext &context, const QgsCoordinateTransform &ct, const QgsGeometry &clipGeometry=QgsGeometry(), bool mergeLines=false) |
Prepares a geometry for registration with PAL. | |
static QStringList | splitToGraphemes (const QString &text) |
Splits a text string to a list of graphemes, which are the smallest allowable character divisions in the string. | |
static QStringList | splitToLines (const QString &text, const QString &wrapCharacter, int autoWrapLength=0, bool useMaxLineLengthWhenAutoWrapping=true) |
Splits a text string to a list of separate lines, using a specified wrap character (wrapCharacter). | |
static bool | staticWillUseLayer (const QgsMapLayer *layer) |
Called to find out whether a specified layer is used for labeling. | |
Friends | |
class | QgsDxfExport |
class | QgsPalLayerSettings |
class | QgsVectorLayerLabelProvider |
PAL labeling utilities.
Definition at line 1035 of file qgspallabeling.h.
|
static |
Checks whether a geometry requires preparation before registration with PAL.
geometry | geometry to prepare |
context | render context |
ct | coordinate transform, or invalid transform if no transformation required |
clipGeometry | geometry to clip features to, if applicable |
mergeLines | true if touching lines from this layer will be merged and treated as single features during labeling |
true
if geometry requires preparation Definition at line 4116 of file qgspallabeling.cpp.
|
static |
Prepares a geometry for registration with PAL.
Handles reprojection, rotation, clipping, etc.
geometry | geometry to prepare |
context | render context |
ct | coordinate transform, or invalid transform if no transformation required |
clipGeometry | geometry to clip features to, if applicable |
mergeLines | true if touching lines from this layer will be merged and treated as single features during labeling |
Definition at line 4193 of file qgspallabeling.cpp.
|
static |
Splits a text string to a list of graphemes, which are the smallest allowable character divisions in the string.
This accounts for scripts were individual characters are not allowed to be split apart (e.g., Arabic and Indic based scripts)
text | string to split |
Definition at line 4179 of file qgspallabeling.cpp.
|
static |
Splits a text string to a list of separate lines, using a specified wrap character (wrapCharacter).
The text string will be split on either newline characters or the wrap character.
Since QGIS 3.4 the autoWrapLength argument can be used to specify an ideal length of line to automatically wrap text to (automatic wrapping is disabled if autoWrapLength is 0). This automatic wrapping is performed after processing wrapping using wrapCharacter. When auto wrapping is enabled, the useMaxLineLengthWhenAutoWrapping argument controls whether the lines should be wrapped to an ideal maximum of autoWrapLength characters, or if false
then the lines are wrapped to an ideal minimum length of autoWrapLength characters.
Definition at line 4148 of file qgspallabeling.cpp.
|
static |
Called to find out whether a specified layer is used for labeling.
Definition at line 4071 of file qgspallabeling.cpp.
|
friend |
Definition at line 1114 of file qgspallabeling.h.
|
friend |
Definition at line 1125 of file qgspallabeling.h.
|
friend |
Definition at line 1113 of file qgspallabeling.h.