QGIS API Documentation
3.12.1-București (121cc00ff0)
|
#include <qgspallabeling.h>
Public Member Functions | |
QgsPalLayerSettings () | |
QgsPalLayerSettings (const QgsPalLayerSettings &s) | |
~QgsPalLayerSettings () | |
void | calculateLabelSize (const QFontMetricsF *fm, const QString &text, double &labelX, double &labelY, const QgsFeature *f=nullptr, QgsRenderContext *context=nullptr, double *rotatedLabelX=nullptr, double *rotatedLabelY=nullptr) |
Calculates the space required to render the provided text in map units. More... | |
QgsCallout * | callout () const |
Returns the label callout renderer, responsible for drawing label callouts. More... | |
QgsPropertyCollection & | dataDefinedProperties () |
Returns a reference to the label's property collection, used for data defined overrides. More... | |
const QgsPropertyCollection & | dataDefinedProperties () const |
Returns a reference to the label's property collection, used for data defined overrides. More... | |
const QgsTextFormat & | format () const |
Returns the label text formatting settings, e.g., font settings, buffer settings, etc. More... | |
QgsExpression * | getLabelExpression () |
Returns the QgsExpression for this label settings. More... | |
const QgsLabelObstacleSettings & | obstacleSettings () const |
Returns the label obstacle settings. More... | |
QgsLabelObstacleSettings & | obstacleSettings () |
Returns the label obstacle settings. More... | |
QgsPalLayerSettings & | operator= (const QgsPalLayerSettings &s) |
copy operator - only copies the permanent members More... | |
bool | prepare (QgsRenderContext &context, QSet< QString > &attributeNames, const QgsFields &fields, const QgsMapSettings &mapSettings, const QgsCoordinateReferenceSystem &crs) |
Prepare for registration of features. More... | |
void | readXml (const QDomElement &elem, const QgsReadWriteContext &context) |
Read settings from a DOM element. More... | |
void | registerFeature (const QgsFeature &f, QgsRenderContext &context, QgsLabelFeature **labelFeature=nullptr, QgsGeometry obstacleGeometry=QgsGeometry(), const QgsSymbol *symbol=nullptr) |
Register a feature for labeling. More... | |
void | setCallout (QgsCallout *callout) |
Sets the label callout renderer, responsible for drawing label callouts. More... | |
void | setDataDefinedProperties (const QgsPropertyCollection &collection) |
Sets the label's property collection, used for data defined overrides. More... | |
void | setFormat (const QgsTextFormat &format) |
Sets the label text formatting settings, e.g., font settings, buffer settings, etc. More... | |
void | setObstacleSettings (const QgsLabelObstacleSettings &settings) |
Sets the label obstacle settings. More... | |
void | setThinningSettings (const QgsLabelThinningSettings &settings) |
Sets the label thinning settings. More... | |
void | startRender (QgsRenderContext &context) |
Prepares the label settings for rendering. More... | |
void | stopRender (QgsRenderContext &context) |
Finalises the label settings after use. More... | |
const QgsLabelThinningSettings & | thinningSettings () const |
Returns the label thinning settings. More... | |
QgsLabelThinningSettings & | thinningSettings () |
Returns the label thinning settings. More... | |
QDomElement | writeXml (QDomDocument &doc, const QgsReadWriteContext &context) const |
Write settings into a DOM element. More... | |
Static Public Member Functions | |
static QPixmap | labelSettingsPreviewPixmap (const QgsPalLayerSettings &settings, QSize size, const QString &previewText=QString(), int padding=0) |
Returns a pixmap preview for label settings. More... | |
static const QgsPropertiesDefinition & | propertyDefinitions () |
Returns the labeling property definitions. More... | |
Public Attributes | |
bool | addDirectionSymbol = false |
If true , '<' 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... | |
double | angleOffset = 0 |
Label rotation, in degrees clockwise. More... | |
int | autoWrapLength = 0 |
If non-zero, indicates that label text should be automatically wrapped to (ideally) the specified number of characters. More... | |
bool | centroidInside = false |
true if centroid positioned labels must be placed inside their corresponding feature polygon, or false if centroids which fall outside the polygon are permitted. More... | |
bool | centroidWhole = false |
true if feature centroid should be calculated from the whole feature, or false if only the visible part of the feature should be considered. More... | |
QgsCoordinateTransform | ct |
int | decimals = 3 |
Number of decimal places to show for numeric labels. More... | |
bool | displayAll = false |
If true , all features will be labelled even when overlaps occur. More... | |
double | dist = 0 |
Distance from feature to the label. More... | |
QgsMapUnitScale | distMapUnitScale |
Map unit scale for label feature distance. More... | |
QgsUnitTypes::RenderUnit | distUnits = QgsUnitTypes::RenderMillimeters |
Units the distance from feature to the label. More... | |
bool | drawLabels = true |
Whether to draw labels for this layer. More... | |
QgsGeometry | extentGeom |
int | fieldIndex = 0 |
QString | fieldName |
Name of field (or an expression) to use for label text. More... | |
bool | fitInPolygonOnly = false |
true if only labels which completely fit within a polygon are allowed. More... | |
bool | fontLimitPixelSize = false |
true if label sizes should be limited by pixel size. More... | |
int | fontMaxPixelSize = 10000 |
Maximum pixel size for showing rendered map unit labels (1 - 10000). More... | |
int | fontMinPixelSize = 0 |
Minimum pixel size for showing rendered map unit labels (1 - 1000). More... | |
bool | formatNumbers = false |
Set to true to format numeric label text as numbers (e.g. More... | |
QString | geometryGenerator |
The geometry generator expression. Null if disabled. More... | |
bool | geometryGeneratorEnabled = false |
Defines if the geometry generator is enabled or not. If disabled, the standard geometry will be taken. More... | |
QgsWkbTypes::GeometryType | geometryGeneratorType = QgsWkbTypes::GeometryType::PointGeometry |
The type of the result geometry of the geometry generator. More... | |
bool | isExpression = false |
true if this label is made from a expression string, e.g., FieldName || 'mm' More... | |
QgsMapUnitScale | labelOffsetMapUnitScale |
Map unit scale for label offset. More... | |
bool | labelPerPart = false |
true if every part of a multi-part feature should be labeled. More... | |
QgsWkbTypes::GeometryType | layerType = QgsWkbTypes::UnknownGeometry |
Geometry type of layers associated with these settings. More... | |
QString | leftDirectionSymbol = QString( '<' ) |
String to use for left direction arrows. More... | |
double | maxCurvedCharAngleIn = 25.0 |
Maximum angle between inside curved label characters (valid range 20.0 to 60.0). More... | |
double | maxCurvedCharAngleOut = -25.0 |
Maximum angle between outside curved label characters (valid range -20.0 to -95.0) More... | |
double | maximumScale = 0 |
The maximum map scale (i.e. More... | |
const QgsFeature * | mCurFeat = nullptr |
QgsFields | mCurFields |
bool | mergeLines = false |
true if connected line features with identical label text should be merged prior to generating label positions. More... | |
int | mFeatsRegPal = 0 |
int | mFeatsSendingToPal = 0 |
int | mFeaturesToLabel = 0 |
double | minimumScale = 0 |
The minimum map scale (i.e. More... | |
MultiLineAlign | multilineAlign = MultiFollowPlacement |
Horizontal alignment of multi-line labels. More... | |
OffsetType | offsetType = FromPoint |
Offset type for layer (only applies in certain placement modes) More... | |
QgsUnitTypes::RenderUnit | offsetUnits = QgsUnitTypes::RenderMillimeters |
Units for offsets of label. More... | |
double | overrunDistance = 0 |
Distance which labels are allowed to overrun past the start or end of line features. More... | |
QgsMapUnitScale | overrunDistanceMapUnitScale |
Map unit scale for label overrun distance. More... | |
QgsUnitTypes::RenderUnit | overrunDistanceUnit = QgsUnitTypes::RenderMillimeters |
Units for label overrun distance. More... | |
DirectionSymbols | placeDirectionSymbol = SymbolLeftRight |
Placement option for direction symbols. More... | |
Placement | placement = AroundPoint |
unsigned int | placementFlags = AboveLine | MapOrientation |
bool | plusSign = false |
Whether '+' signs should be prepended to positive numeric labels. More... | |
QVector< PredefinedPointPosition > | predefinedPositionOrder |
Ordered list of predefined label positions for points. More... | |
bool | preserveRotation = true |
True if label rotation should be preserved during label pin/unpin operations. More... | |
Q_DECL_DEPRECATED QColor | previewBkgrdColor = Qt::white |
int | priority = 5 |
Label priority. More... | |
QgsPointXY | ptOne |
QgsPointXY | ptZero |
QuadrantPosition | quadOffset = QuadrantOver |
Sets the quadrant in which to offset labels from feature. More... | |
double | repeatDistance = 0 |
Distance for repeating labels for a single feature. More... | |
QgsMapUnitScale | repeatDistanceMapUnitScale |
Map unit scale for repeating labels for a single feature. More... | |
QgsUnitTypes::RenderUnit | repeatDistanceUnit = QgsUnitTypes::RenderMillimeters |
Units for repeating labels for a single feature. More... | |
bool | reverseDirectionSymbol = false |
True if direction symbols should be reversed. More... | |
QString | rightDirectionSymbol = QString( '>' ) |
String to use for right direction arrows. More... | |
bool | scaleVisibility = false |
Set to true to limit label visibility to a range of scales. More... | |
QgsStringReplacementCollection | substitutions |
Substitution collection for automatic text substitution with labels. More... | |
UpsideDownLabels | upsidedownLabels = Upright |
Controls whether upside down labels are displayed and how they are handled. More... | |
bool | useMaxLineLengthForAutoWrap = true |
If true , indicates that when auto wrapping label text the autoWrapLength length indicates the maximum ideal length of text lines. More... | |
bool | useSubstitutions = false |
True if substitutions should be applied. More... | |
QString | wrapChar |
Wrapping character string. More... | |
const QgsMapToPixel * | xform = nullptr |
double | xOffset = 0 |
Horizontal offset of label. More... | |
double | yOffset = 0 |
Vertical offset of label. More... | |
double | zIndex = 0 |
Z-Index of label, where labels with a higher z-index are rendered on top of labels with a lower z-index. More... | |
Friends | |
class | QgsVectorLayer |
Definition at line 202 of file qgspallabeling.h.
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 298 of file qgspallabeling.h.
Line placement flags, which control how candidates are generated for a linear feature.
Definition at line 264 of file qgspallabeling.h.
Enumerator | |
---|---|
MultiLeft | |
MultiCenter | |
MultiRight | |
MultiFollowPlacement | Alignment follows placement of label, e.g., labels to the left of a feature will be drawn with right alignment |
Definition at line 305 of file qgspallabeling.h.
Valid obstacle types, which affect how features within the layer will act as obstacles for labels.
Definition at line 320 of file qgspallabeling.h.
Behavior modifier for label offset and distance, only applies in some label placement modes.
Enumerator | |
---|---|
FromPoint | Offset distance applies from point geometry. |
FromSymbolBounds | Offset distance applies from rendered symbol bounds. |
Definition at line 253 of file qgspallabeling.h.
Placement modes which determine how label candidates are generated for a feature.
Definition at line 217 of file qgspallabeling.h.
Positions for labels when using the QgsPalLabeling::OrderedPositionsAroundPoint placement mode.
Definition at line 231 of file qgspallabeling.h.
Data definable properties.
Definition at line 333 of file qgspallabeling.h.
Enumerator | |
---|---|
QuadrantAboveLeft | |
QuadrantAbove | |
QuadrantAboveRight | |
QuadrantLeft | |
QuadrantOver | |
QuadrantRight | |
QuadrantBelowLeft | |
QuadrantBelow | |
QuadrantBelowRight |
Definition at line 278 of file qgspallabeling.h.
Definition at line 291 of file qgspallabeling.h.
Q_NOWARN_DEPRECATED_PUSH QgsPalLayerSettings::QgsPalLayerSettings | ( | ) |
Definition at line 258 of file qgspallabeling.cpp.
Q_NOWARN_DEPRECATED_POP Q_NOWARN_DEPRECATED_PUSH QgsPalLayerSettings::QgsPalLayerSettings | ( | const QgsPalLayerSettings & | s | ) |
Definition at line 267 of file qgspallabeling.cpp.
QgsPalLayerSettings::~QgsPalLayerSettings | ( | ) |
Definition at line 525 of file qgspallabeling.cpp.
void QgsPalLayerSettings::calculateLabelSize | ( | const QFontMetricsF * | fm, |
const QString & | text, | ||
double & | labelX, | ||
double & | labelY, | ||
const QgsFeature * | f = nullptr , |
||
QgsRenderContext * | context = nullptr , |
||
double * | rotatedLabelX = nullptr , |
||
double * | rotatedLabelY = nullptr |
||
) |
Calculates the space required to render the provided text in map units.
Results will be written to labelX and labelY. If the text orientation is set to rotation-based, the spaced taken to render vertically oriented text will be written to rotatedLabelX and rotatedLabelY .
Definition at line 1338 of file qgspallabeling.cpp.
|
inline |
Returns the label callout renderer, responsible for drawing label callouts.
Ownership is not transferred.
Definition at line 1001 of file qgspallabeling.h.
|
inline |
Returns a reference to the label's property collection, used for data defined overrides.
Definition at line 958 of file qgspallabeling.h.
|
inline |
Returns a reference to the label's property collection, used for data defined overrides.
Definition at line 967 of file qgspallabeling.h.
|
inline |
Returns the label text formatting settings, e.g., font settings, buffer settings, etc.
Definition at line 983 of file qgspallabeling.h.
QgsExpression * QgsPalLayerSettings::getLabelExpression | ( | ) |
Returns the QgsExpression for this label settings.
May be nullptr
if isExpression is false
.
Definition at line 544 of file qgspallabeling.cpp.
|
static |
Returns a pixmap preview for label settings.
settings | label settings |
size | target pixmap size |
previewText | text to render in preview, or empty for default text |
padding | space between icon edge and color ramp |
Definition at line 1214 of file qgspallabeling.cpp.
|
inline |
Returns the label obstacle settings.
Definition at line 1019 of file qgspallabeling.h.
|
inline |
Returns the label obstacle settings.
Definition at line 1026 of file qgspallabeling.h.
Q_NOWARN_DEPRECATED_POP QgsPalLayerSettings & QgsPalLayerSettings::operator= | ( | const QgsPalLayerSettings & | s | ) |
copy operator - only copies the permanent members
Definition at line 275 of file qgspallabeling.cpp.
bool QgsPalLayerSettings::prepare | ( | QgsRenderContext & | context, |
QSet< QString > & | attributeNames, | ||
const QgsFields & | fields, | ||
const QgsMapSettings & | mapSettings, | ||
const QgsCoordinateReferenceSystem & | crs | ||
) |
Prepare for registration of features.
The context, mapSettings and fields parameters give more information about the rendering environment. If target crs is not specified, the targetCrs from mapSettings will be taken. The parameter attributeNames should be updated to contain all the field names which the labeling requires for the rendering.
Definition at line 365 of file qgspallabeling.cpp.
|
static |
Returns the labeling property definitions.
Definition at line 538 of file qgspallabeling.cpp.
void QgsPalLayerSettings::readXml | ( | const QDomElement & | elem, |
const QgsReadWriteContext & | context | ||
) |
void QgsPalLayerSettings::registerFeature | ( | const QgsFeature & | f, |
QgsRenderContext & | context, | ||
QgsLabelFeature ** | labelFeature = nullptr , |
||
QgsGeometry | obstacleGeometry = QgsGeometry() , |
||
const QgsSymbol * | symbol = nullptr |
||
) |
Register a feature for labeling.
f | feature to label |
context | render context. The QgsExpressionContext contained within the render context must have already had the feature and fields sets prior to calling this method. |
labelFeature | if using QgsLabelingEngine, this will receive the label feature. Not available in Python bindings. |
obstacleGeometry | optional obstacle geometry, if a different geometry to the feature's geometry should be used as an obstacle for labels (e.g., if the feature has been rendered with an offset point symbol, the obstacle geometry should represent the bounds of the offset symbol). If not set, the feature's original geometry will be used as an obstacle for labels. Not available in Python bindings. |
symbol | feature symbol to label (ownership is not transferred, and symbol must exist until the labeling is complete) |
Definition at line 1574 of file qgspallabeling.cpp.
void QgsPalLayerSettings::setCallout | ( | QgsCallout * | callout | ) |
Sets the label callout renderer, responsible for drawing label callouts.
Ownership of callout is transferred to the settings.
Definition at line 1209 of file qgspallabeling.cpp.
|
inline |
Sets the label's property collection, used for data defined overrides.
collection | property collection. Existing properties will be replaced. |
Definition at line 976 of file qgspallabeling.h.
|
inline |
Sets the label text formatting settings, e.g., font settings, buffer settings, etc.
format | label text format |
Definition at line 991 of file qgspallabeling.h.
|
inline |
Sets the label obstacle settings.
Definition at line 1033 of file qgspallabeling.h.
|
inline |
Sets the label thinning settings.
Definition at line 1055 of file qgspallabeling.h.
void QgsPalLayerSettings::startRender | ( | QgsRenderContext & | context | ) |
Prepares the label settings for rendering.
This should be called before rendering any labels, and must be followed by a call to stopRender() in order to gracefully clean up symbols.
Definition at line 486 of file qgspallabeling.cpp.
void QgsPalLayerSettings::stopRender | ( | QgsRenderContext & | context | ) |
Finalises the label settings after use.
This must be called after a call to startRender(), in order to gracefully clean up symbols.
Definition at line 509 of file qgspallabeling.cpp.
|
inline |
Returns the label thinning settings.
Definition at line 1041 of file qgspallabeling.h.
|
inline |
Returns the label thinning settings.
Definition at line 1048 of file qgspallabeling.h.
QDomElement QgsPalLayerSettings::writeXml | ( | QDomDocument & | doc, |
const QgsReadWriteContext & | context | ||
) | const |
Write settings into a DOM element.
Definition at line 1105 of file qgspallabeling.cpp.
|
friend |
Definition at line 1082 of file qgspallabeling.h.
bool QgsPalLayerSettings::addDirectionSymbol = false |
If true
, '<' 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.
This setting only affects line or perimeter based labels.
Definition at line 585 of file qgspallabeling.h.
double QgsPalLayerSettings::angleOffset = 0 |
Label rotation, in degrees clockwise.
Definition at line 775 of file qgspallabeling.h.
int QgsPalLayerSettings::autoWrapLength = 0 |
If non-zero, indicates that label text should be automatically wrapped to (ideally) the specified number of characters.
If zero, auto wrapping is disabled.
Definition at line 558 of file qgspallabeling.h.
bool QgsPalLayerSettings::centroidInside = false |
true
if centroid positioned labels must be placed inside their corresponding feature polygon, or false
if centroids which fall outside the polygon are permitted.
Definition at line 653 of file qgspallabeling.h.
bool QgsPalLayerSettings::centroidWhole = false |
true
if feature centroid should be calculated from the whole feature, or false
if only the visible part of the feature should be considered.
Definition at line 646 of file qgspallabeling.h.
QgsCoordinateTransform QgsPalLayerSettings::ct |
Definition at line 1072 of file qgspallabeling.h.
int QgsPalLayerSettings::decimals = 3 |
Number of decimal places to show for numeric labels.
formatNumbers must be true
for this setting to have an effect.
Definition at line 623 of file qgspallabeling.h.
bool QgsPalLayerSettings::displayAll = false |
If true
, all features will be labelled even when overlaps occur.
Definition at line 853 of file qgspallabeling.h.
double QgsPalLayerSettings::dist = 0 |
Distance from feature to the label.
Units are specified via distUnits.
Definition at line 673 of file qgspallabeling.h.
QgsMapUnitScale QgsPalLayerSettings::distMapUnitScale |
Map unit scale for label feature distance.
Definition at line 687 of file qgspallabeling.h.
QgsUnitTypes::RenderUnit QgsPalLayerSettings::distUnits = QgsUnitTypes::RenderMillimeters |
Units the distance from feature to the label.
Definition at line 680 of file qgspallabeling.h.
bool QgsPalLayerSettings::drawLabels = true |
Whether to draw labels for this layer.
For some layers it may be desirable to register their features as obstacles for other labels without requiring labels to be drawn for the layer itself. In this case drawLabels can be set to false
and obstacle set to true
, which will result in the layer acting as an obstacle but having no labels of its own.
Definition at line 511 of file qgspallabeling.h.
QgsGeometry QgsPalLayerSettings::extentGeom |
Definition at line 1076 of file qgspallabeling.h.
int QgsPalLayerSettings::fieldIndex = 0 |
Definition at line 1070 of file qgspallabeling.h.
QString QgsPalLayerSettings::fieldName |
Name of field (or an expression) to use for label text.
If fieldName is an expression, then isExpression should be set to true
.
Definition at line 520 of file qgspallabeling.h.
bool QgsPalLayerSettings::fitInPolygonOnly = false |
true
if only labels which completely fit within a polygon are allowed.
Definition at line 666 of file qgspallabeling.h.
bool QgsPalLayerSettings::fontLimitPixelSize = false |
true
if label sizes should be limited by pixel size.
Definition at line 836 of file qgspallabeling.h.
int QgsPalLayerSettings::fontMaxPixelSize = 10000 |
Maximum pixel size for showing rendered map unit labels (1 - 10000).
Definition at line 850 of file qgspallabeling.h.
int QgsPalLayerSettings::fontMinPixelSize = 0 |
Minimum pixel size for showing rendered map unit labels (1 - 1000).
Definition at line 843 of file qgspallabeling.h.
bool QgsPalLayerSettings::formatNumbers = false |
Set to true
to format numeric label text as numbers (e.g.
inserting thousand separators and fixed number of decimal places).
Definition at line 616 of file qgspallabeling.h.
QString QgsPalLayerSettings::geometryGenerator |
The geometry generator expression. Null if disabled.
Definition at line 901 of file qgspallabeling.h.
bool QgsPalLayerSettings::geometryGeneratorEnabled = false |
Defines if the geometry generator is enabled or not. If disabled, the standard geometry will be taken.
Definition at line 907 of file qgspallabeling.h.
QgsWkbTypes::GeometryType QgsPalLayerSettings::geometryGeneratorType = QgsWkbTypes::GeometryType::PointGeometry |
The type of the result geometry of the geometry generator.
Definition at line 904 of file qgspallabeling.h.
bool QgsPalLayerSettings::isExpression = false |
true
if this label is made from a expression string, e.g., FieldName || 'mm'
Definition at line 526 of file qgspallabeling.h.
QgsMapUnitScale QgsPalLayerSettings::labelOffsetMapUnitScale |
Map unit scale for label offset.
Definition at line 772 of file qgspallabeling.h.
bool QgsPalLayerSettings::labelPerPart = false |
true
if every part of a multi-part feature should be labeled.
If false
, only the largest part will be labeled.
Definition at line 862 of file qgspallabeling.h.
QgsWkbTypes::GeometryType QgsPalLayerSettings::layerType = QgsWkbTypes::UnknownGeometry |
Geometry type of layers associated with these settings.
Definition at line 913 of file qgspallabeling.h.
QString QgsPalLayerSettings::leftDirectionSymbol = QString( '<' ) |
String to use for left direction arrows.
Definition at line 592 of file qgspallabeling.h.
double QgsPalLayerSettings::maxCurvedCharAngleIn = 25.0 |
Maximum angle between inside curved label characters (valid range 20.0 to 60.0).
Definition at line 784 of file qgspallabeling.h.
double QgsPalLayerSettings::maxCurvedCharAngleOut = -25.0 |
Maximum angle between outside curved label characters (valid range -20.0 to -95.0)
Definition at line 790 of file qgspallabeling.h.
double QgsPalLayerSettings::maximumScale = 0 |
The maximum map scale (i.e.
most "zoomed in" scale) at which the labels will be visible. The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. A scale of 0 indicates no maximum scale visibility.
This setting is only considered if scaleVisibility is true
.
Definition at line 817 of file qgspallabeling.h.
const QgsFeature* QgsPalLayerSettings::mCurFeat = nullptr |
Definition at line 1068 of file qgspallabeling.h.
QgsFields QgsPalLayerSettings::mCurFields |
Definition at line 1069 of file qgspallabeling.h.
bool QgsPalLayerSettings::mergeLines = false |
true
if connected line features with identical label text should be merged prior to generating label positions.
Definition at line 868 of file qgspallabeling.h.
int QgsPalLayerSettings::mFeatsRegPal = 0 |
Definition at line 1079 of file qgspallabeling.h.
int QgsPalLayerSettings::mFeatsSendingToPal = 0 |
Definition at line 1078 of file qgspallabeling.h.
int QgsPalLayerSettings::mFeaturesToLabel = 0 |
Definition at line 1077 of file qgspallabeling.h.
double QgsPalLayerSettings::minimumScale = 0 |
The minimum map scale (i.e.
most "zoomed out" scale) at which the labels will be visible. The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. A scale of 0 indicates no minimum scale visibility.
This setting is only considered if scaleVisibility is true
.
Definition at line 829 of file qgspallabeling.h.
MultiLineAlign QgsPalLayerSettings::multilineAlign = MultiFollowPlacement |
Horizontal alignment of multi-line labels.
Definition at line 573 of file qgspallabeling.h.
OffsetType QgsPalLayerSettings::offsetType = FromPoint |
Offset type for layer (only applies in certain placement modes)
Definition at line 690 of file qgspallabeling.h.
QgsUnitTypes::RenderUnit QgsPalLayerSettings::offsetUnits = QgsUnitTypes::RenderMillimeters |
Units for offsets of label.
Definition at line 764 of file qgspallabeling.h.
double QgsPalLayerSettings::overrunDistance = 0 |
Distance which labels are allowed to overrun past the start or end of line features.
Definition at line 719 of file qgspallabeling.h.
QgsMapUnitScale QgsPalLayerSettings::overrunDistanceMapUnitScale |
Map unit scale for label overrun distance.
Definition at line 735 of file qgspallabeling.h.
QgsUnitTypes::RenderUnit QgsPalLayerSettings::overrunDistanceUnit = QgsUnitTypes::RenderMillimeters |
DirectionSymbols QgsPalLayerSettings::placeDirectionSymbol = SymbolLeftRight |
Placement option for direction symbols.
Controls whether to place symbols to the left/right, above or below label.
Definition at line 605 of file qgspallabeling.h.
Placement QgsPalLayerSettings::placement = AroundPoint |
Definition at line 634 of file qgspallabeling.h.
unsigned int QgsPalLayerSettings::placementFlags = AboveLine | MapOrientation |
Definition at line 637 of file qgspallabeling.h.
bool QgsPalLayerSettings::plusSign = false |
Whether '+' signs should be prepended to positive numeric labels.
formatNumbers must be true
for this setting to have an effect.
Definition at line 630 of file qgspallabeling.h.
QVector< PredefinedPointPosition > QgsPalLayerSettings::predefinedPositionOrder |
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 QgsPalLayerSettings::OrderedPositionsAroundPoint.
Definition at line 661 of file qgspallabeling.h.
bool QgsPalLayerSettings::preserveRotation = true |
True if label rotation should be preserved during label pin/unpin operations.
Definition at line 778 of file qgspallabeling.h.
Q_DECL_DEPRECATED QColor QgsPalLayerSettings::previewBkgrdColor = Qt::white |
Use QgsTextFormat::previewBackgroundColor() instead.
Definition at line 536 of file qgspallabeling.h.
int QgsPalLayerSettings::priority = 5 |
Label priority.
Valid ranges are from 0 to 10, where 0 = lowest priority and 10 = highest priority.
Definition at line 796 of file qgspallabeling.h.
QgsPointXY QgsPalLayerSettings::ptOne |
Definition at line 1075 of file qgspallabeling.h.
QgsPointXY QgsPalLayerSettings::ptZero |
Definition at line 1074 of file qgspallabeling.h.
QuadrantPosition QgsPalLayerSettings::quadOffset = QuadrantOver |
Sets the quadrant in which to offset labels from feature.
Definition at line 740 of file qgspallabeling.h.
double QgsPalLayerSettings::repeatDistance = 0 |
Distance for repeating labels for a single feature.
Definition at line 697 of file qgspallabeling.h.
QgsMapUnitScale QgsPalLayerSettings::repeatDistanceMapUnitScale |
Map unit scale for repeating labels for a single feature.
Definition at line 711 of file qgspallabeling.h.
QgsUnitTypes::RenderUnit QgsPalLayerSettings::repeatDistanceUnit = QgsUnitTypes::RenderMillimeters |
Units for repeating labels for a single feature.
Definition at line 704 of file qgspallabeling.h.
bool QgsPalLayerSettings::reverseDirectionSymbol = false |
True if direction symbols should be reversed.
Definition at line 608 of file qgspallabeling.h.
QString QgsPalLayerSettings::rightDirectionSymbol = QString( '>' ) |
String to use for right direction arrows.
Definition at line 599 of file qgspallabeling.h.
bool QgsPalLayerSettings::scaleVisibility = false |
Set to true
to limit label visibility to a range of scales.
Definition at line 805 of file qgspallabeling.h.
QgsStringReplacementCollection QgsPalLayerSettings::substitutions |
Substitution collection for automatic text substitution with labels.
Definition at line 539 of file qgspallabeling.h.
UpsideDownLabels QgsPalLayerSettings::upsidedownLabels = Upright |
Controls whether upside down labels are displayed and how they are handled.
Definition at line 856 of file qgspallabeling.h.
bool QgsPalLayerSettings::useMaxLineLengthForAutoWrap = true |
If true
, indicates that when auto wrapping label text the autoWrapLength length indicates the maximum ideal length of text lines.
If false
, then autoWrapLength indicates the ideal minimum length of text lines.
If autoWrapLength is 0 then this value has no effect.
Definition at line 570 of file qgspallabeling.h.
bool QgsPalLayerSettings::useSubstitutions = false |
True if substitutions should be applied.
Definition at line 541 of file qgspallabeling.h.
QString QgsPalLayerSettings::wrapChar |
Wrapping character string.
If set, any occurrences of this string in the calculated label text will be replaced with new line characters.
Definition at line 549 of file qgspallabeling.h.
const QgsMapToPixel* QgsPalLayerSettings::xform = nullptr |
Definition at line 1071 of file qgspallabeling.h.
double QgsPalLayerSettings::xOffset = 0 |
Horizontal offset of label.
Units are specified via offsetUnits.
Definition at line 748 of file qgspallabeling.h.
double QgsPalLayerSettings::yOffset = 0 |
Vertical offset of label.
Units are specified via offsetUnits.
Definition at line 756 of file qgspallabeling.h.
double QgsPalLayerSettings::zIndex = 0 |
Z-Index of label, where labels with a higher z-index are rendered on top of labels with a lower z-index.
Definition at line 898 of file qgspallabeling.h.