|
QGIS API Documentation 3.99.0-Master (09f76ad7019)
|
Contains settings for how a map layer will be labeled. More...
#include <qgspallabeling.h>
Public Member Functions | |
| QgsPalLayerSettings () | |
| QgsPalLayerSettings (const QgsPalLayerSettings &s) | |
| ~QgsPalLayerSettings () | |
| Q_DECL_DEPRECATED 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. | |
| QgsCallout * | callout () const |
| Returns the label callout renderer, responsible for drawing label callouts. | |
| bool | containsAdvancedEffects () const |
Returns true if any component of the label settings requires advanced effects such as blend modes, which require output in raster formats to be fully respected. | |
| QgsPropertyCollection & | dataDefinedProperties () |
| Returns a reference to the label's property collection, used for data defined overrides. | |
| const QgsPropertyCollection & | dataDefinedProperties () const |
| Returns a reference to the label's property collection, used for data defined overrides. | |
| const QgsTextFormat & | format () const |
| Returns the label text formatting settings, e.g., font settings, buffer settings, etc. | |
| QgsExpression * | getLabelExpression () const |
| Returns the QgsExpression for this label settings. | |
| QString | legendString () const |
| legendString | |
| QgsLabelLineSettings & | lineSettings () |
| Returns the label line settings, which contain 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). | |
| const QgsLabelLineSettings & | lineSettings () const |
| Returns the label line settings, which contain 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). | |
| QgsLabelObstacleSettings & | obstacleSettings () |
| Returns the label obstacle settings. | |
| const QgsLabelObstacleSettings & | obstacleSettings () const |
| Returns the label obstacle settings. | |
| QgsPalLayerSettings & | operator= (const QgsPalLayerSettings &s) |
| copy operator - only copies the permanent members | |
| QgsLabelPlacementSettings & | placementSettings () |
| Returns the label placement settings. | |
| const QgsLabelPlacementSettings & | placementSettings () const |
| Returns the label placement settings. | |
| QgsLabelPointSettings & | pointSettings () |
| Returns the label point settings, which contain 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. | |
| const QgsLabelPointSettings & | pointSettings () const |
| Returns the label point settings, which contain 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. | |
| Qgis::LabelPolygonPlacementFlags | polygonPlacementFlags () const |
| Returns the polygon placement flags, which dictate how polygon labels can be placed. | |
| bool | prepare (QgsRenderContext &context, QSet< QString > &attributeNames, const QgsFields &fields, const QgsMapSettings &mapSettings, const QgsCoordinateReferenceSystem &crs) |
| Prepare for registration of features. | |
| void | readXml (const QDomElement &elem, const QgsReadWriteContext &context) |
| Read settings from a DOM element. | |
| QSet< QString > | referencedFields (const QgsRenderContext &context) const |
| Returns all field names referenced by the configuration (e.g. | |
| void | registerFeature (const QgsFeature &f, QgsRenderContext &context) |
| Registers a feature for labeling. | |
| std::vector< std::unique_ptr< QgsLabelFeature > > | registerFeatureWithDetails (const QgsFeature &feature, QgsRenderContext &context, QgsGeometry obstacleGeometry=QgsGeometry(), const QgsSymbol *symbol=nullptr) |
| Registers a feature for labeling. | |
| Qgis::AngleUnit | rotationUnit () const |
| Unit for rotation of labels. | |
| void | setCallout (QgsCallout *callout) |
| Sets the label callout renderer, responsible for drawing label callouts. | |
| void | setDataDefinedProperties (const QgsPropertyCollection &collection) |
| Sets the label's property collection, used for data defined overrides. | |
| void | setFormat (const QgsTextFormat &format) |
| Sets the label text formatting settings, e.g., font settings, buffer settings, etc. | |
| void | setLegendString (const QString &legendString) |
| setLegendString | |
| void | setLineSettings (const QgsLabelLineSettings &settings) |
| Sets the label line settings, which contain 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). | |
| void | setObstacleSettings (const QgsLabelObstacleSettings &settings) |
| Sets the label obstacle settings. | |
| void | setPlacementSettings (const QgsLabelPlacementSettings &settings) |
| Sets the label placement settings. | |
| void | setPointSettings (const QgsLabelPointSettings &settings) |
| Sets the label point settings, which contain 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. | |
| void | setPolygonPlacementFlags (Qgis::LabelPolygonPlacementFlags flags) |
| Sets the polygon placement flags, which dictate how polygon labels can be placed. | |
| void | setRotationUnit (Qgis::AngleUnit angleUnit) |
| Set unit for rotation of labels. | |
| void | setThinningSettings (const QgsLabelThinningSettings &settings) |
| Sets the label thinning settings. | |
| void | setUnplacedVisibility (Qgis::UnplacedLabelVisibility visibility) |
| Sets the layer's unplaced label visibility. | |
| void | startRender (QgsRenderContext &context) |
| Prepares the label settings for rendering. | |
| void | stopRender (QgsRenderContext &context) |
| Finalises the label settings after use. | |
| QgsLabelThinningSettings & | thinningSettings () |
| Returns the label thinning settings. | |
| const QgsLabelThinningSettings & | thinningSettings () const |
| Returns the label thinning settings. | |
| QMimeData * | toMimeData () const |
| Returns new mime data representing the labeling settings. | |
| Qgis::UnplacedLabelVisibility | unplacedVisibility () const |
| Returns the layer's unplaced label visibility. | |
| QDomElement | writeXml (QDomDocument &doc, const QgsReadWriteContext &context) const |
| Write settings into a DOM element. | |
Static Public Member Functions | |
| static QgsPalLayerSettings | fromMimeData (const QMimeData *data, bool *ok=nullptr) |
| Attempts to parse the provided mime data as a QgsPalLayerSettings. | |
| static QPixmap | labelSettingsPreviewPixmap (const QgsPalLayerSettings &settings, QSize size, const QString &previewText=QString(), int padding=0, const QgsScreenProperties &screen=QgsScreenProperties()) |
| Returns a pixmap preview for label settings. | |
| static const QgsPropertiesDefinition & | propertyDefinitions () |
| Returns the labeling property definitions. | |
Public Attributes | |
| double | angleOffset = 0 |
| Label rotation, in degrees clockwise. | |
| int | autoWrapLength = 0 |
| If non-zero, indicates that label text should be automatically wrapped to (ideally) the specified number of characters. | |
| 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. | |
| 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. | |
| QgsCoordinateTransform | ct |
| int | decimals = 3 |
| Number of decimal places to show for numeric labels. | |
| double | dist = 0 |
| Distance from feature to the label. | |
| QgsMapUnitScale | distMapUnitScale |
| Map unit scale for label feature distance. | |
| Qgis::RenderUnit | distUnits = Qgis::RenderUnit::Millimeters |
| Units the distance from feature to the label. | |
| bool | drawLabels = true |
| Whether to draw labels for this layer. | |
| QgsGeometry | extentGeom |
| int | fieldIndex = 0 |
| QString | fieldName |
| Name of field (or an expression) to use for label text. | |
| bool | fitInPolygonOnly = false |
true if only labels which completely fit within a polygon are allowed. | |
| bool | fontLimitPixelSize = false |
true if label sizes should be limited by pixel size. | |
| int | fontMaxPixelSize = 10000 |
| Maximum pixel size for showing rendered map unit labels (1 - 10000). | |
| int | fontMinPixelSize = 0 |
| Minimum pixel size for showing rendered map unit labels (1 - 1000). | |
| bool | formatNumbers = false |
Set to true to format numeric label text as numbers (e.g. | |
| QString | geometryGenerator |
| The geometry generator expression. Null if disabled. | |
| bool | geometryGeneratorEnabled = false |
| Defines if the geometry generator is enabled or not. If disabled, the standard geometry will be taken. | |
| Qgis::GeometryType | geometryGeneratorType = Qgis::GeometryType::Point |
| The type of the result geometry of the geometry generator. | |
| bool | isExpression = false |
true if this label is made from a expression string, e.g., FieldName || 'mm' | |
| QgsMapUnitScale | labelOffsetMapUnitScale |
| Map unit scale for label offset. | |
| Qgis::GeometryType | layerType = Qgis::GeometryType::Unknown |
| Geometry type of layers associated with these settings. | |
| double | maxCurvedCharAngleIn = 25.0 |
| Maximum angle between inside curved label characters (valid range 20.0 to 60.0). | |
| double | maxCurvedCharAngleOut = -25.0 |
| Maximum angle between outside curved label characters (valid range -20.0 to -95.0). | |
| double | maximumScale = 0 |
| The maximum map scale (i.e. | |
| const QgsFeature * | mCurFeat = nullptr |
| QgsFields | mCurFields |
| int | mFeatsRegPal = 0 |
| int | mFeatsSendingToPal = 0 |
| int | mFeaturesToLabel = 0 |
| double | minimumScale = 0 |
| The minimum map scale (i.e. | |
| Qgis::LabelMultiLineAlignment | multilineAlign = Qgis::LabelMultiLineAlignment::FollowPlacement |
| Horizontal alignment of multi-line labels. | |
| Qgis::LabelOffsetType | offsetType = Qgis::LabelOffsetType::FromPoint |
| Offset type for layer (only applies in certain placement modes). | |
| Qgis::RenderUnit | offsetUnits = Qgis::RenderUnit::Millimeters |
| Units for offsets of label. | |
| Qgis::LabelPlacement | placement = Qgis::LabelPlacement::AroundPoint |
| Label placement mode. | |
| bool | plusSign = false |
| Whether '+' signs should be prepended to positive numeric labels. | |
| bool | preserveRotation = true |
| True if label rotation should be preserved during label pin/unpin operations. | |
| Q_DECL_DEPRECATED QColor | previewBkgrdColor = Qt::white |
| int | priority = 5 |
| Label priority. | |
| QgsPointXY | ptOne |
| QgsPointXY | ptZero |
| double | repeatDistance = 0 |
| Distance for repeating labels for a single feature. | |
| QgsMapUnitScale | repeatDistanceMapUnitScale |
| Map unit scale for repeating labels for a single feature. | |
| Qgis::RenderUnit | repeatDistanceUnit = Qgis::RenderUnit::Millimeters |
| Units for repeating labels for a single feature. | |
| bool | scaleVisibility = false |
Set to true to limit label visibility to a range of scales. | |
| QgsStringReplacementCollection | substitutions |
| Substitution collection for automatic text substitution with labels. | |
| Qgis::UpsideDownLabelHandling | upsidedownLabels = Qgis::UpsideDownLabelHandling::FlipUpsideDownLabels |
| Controls whether upside down labels are displayed and how they are handled. | |
| bool | useMaxLineLengthForAutoWrap = true |
If true, indicates that when auto wrapping label text the autoWrapLength length indicates the maximum ideal length of text lines. | |
| bool | useSubstitutions = false |
| True if substitutions should be applied. | |
| QString | wrapChar |
| Wrapping character string. | |
| const QgsMapToPixel * | xform = nullptr |
| double | xOffset = 0 |
| Horizontal offset of label. | |
| double | yOffset = 0 |
| Vertical offset of label. | |
| 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. | |
Friends | |
| class | QgsVectorLayer |
Contains settings for how a map layer will be labeled.
Definition at line 89 of file qgspallabeling.h.
|
strong |
Data definable properties.
Definition at line 101 of file qgspallabeling.h.
| Q_NOWARN_DEPRECATED_PUSH QgsPalLayerSettings::QgsPalLayerSettings | ( | ) |
Definition at line 276 of file qgspallabeling.cpp.
| Q_NOWARN_DEPRECATED_POP Q_NOWARN_DEPRECATED_PUSH QgsPalLayerSettings::QgsPalLayerSettings | ( | const QgsPalLayerSettings & | s | ) |
Definition at line 288 of file qgspallabeling.cpp.
| QgsPalLayerSettings::~QgsPalLayerSettings | ( | ) |
Definition at line 604 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 1617 of file qgspallabeling.cpp.
|
inline |
Returns the label callout renderer, responsible for drawing label callouts.
Ownership is not transferred.
Definition at line 739 of file qgspallabeling.h.
| bool QgsPalLayerSettings::containsAdvancedEffects | ( | ) | const |
Returns true if any component of the label settings requires advanced effects such as blend modes, which require output in raster formats to be fully respected.
Definition at line 599 of file qgspallabeling.cpp.
|
inline |
Returns a reference to the label's property collection, used for data defined overrides.
Definition at line 700 of file qgspallabeling.h.
|
inline |
Returns a reference to the label's property collection, used for data defined overrides.
Definition at line 708 of file qgspallabeling.h.
|
inline |
Returns the label text formatting settings, e.g., font settings, buffer settings, etc.
Definition at line 722 of file qgspallabeling.h.
|
static |
Attempts to parse the provided mime data as a QgsPalLayerSettings.
If data can be parsed as a labeling settings, ok will be set to true.
Definition at line 5106 of file qgspallabeling.cpp.
| QgsExpression * QgsPalLayerSettings::getLabelExpression | ( | ) | const |
Returns the QgsExpression for this label settings.
Definition at line 619 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 |
| screen | can be used to specify the destination screen properties for the icon. This allows the icon to be generated using the correct DPI and device pixel ratio for the target screen (since QGIS 3.32) |
Definition at line 1456 of file qgspallabeling.cpp.
|
inline |
legendString
Definition at line 636 of file qgspallabeling.h.
|
inline |
Returns the label line settings, which contain 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 768 of file qgspallabeling.h.
|
inline |
Returns the label line settings, which contain 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 759 of file qgspallabeling.h.
|
inline |
Returns the label obstacle settings.
Definition at line 823 of file qgspallabeling.h.
|
inline |
Returns the label obstacle settings.
Definition at line 816 of file qgspallabeling.h.
| Q_NOWARN_DEPRECATED_POP QgsPalLayerSettings & QgsPalLayerSettings::operator= | ( | const QgsPalLayerSettings & | s | ) |
copy operator - only copies the permanent members
Definition at line 295 of file qgspallabeling.cpp.
|
inline |
Returns the label placement settings.
Definition at line 867 of file qgspallabeling.h.
|
inline |
Returns the label placement settings.
Definition at line 860 of file qgspallabeling.h.
|
inline |
Returns the label point settings, which contain 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.
Definition at line 798 of file qgspallabeling.h.
|
inline |
Returns the label point settings, which contain 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.
Definition at line 788 of file qgspallabeling.h.
|
inline |
Returns the polygon placement flags, which dictate how polygon labels can be placed.
Definition at line 408 of file qgspallabeling.h.
| 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 380 of file qgspallabeling.cpp.
|
static |
Returns the labeling property definitions.
Definition at line 613 of file qgspallabeling.cpp.
| void QgsPalLayerSettings::readXml | ( | const QDomElement & | elem, |
| const QgsReadWriteContext & | context ) |
Read settings from a DOM element.
Definition at line 966 of file qgspallabeling.cpp.
| QSet< QString > QgsPalLayerSettings::referencedFields | ( | const QgsRenderContext & | context | ) | const |
Returns all field names referenced by the configuration (e.g.
field name or expression, data defined properties).
Definition at line 510 of file qgspallabeling.cpp.
| void QgsPalLayerSettings::registerFeature | ( | const QgsFeature & | f, |
| QgsRenderContext & | context ) |
Registers 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. |
Definition at line 1961 of file qgspallabeling.cpp.
| std::vector< std::unique_ptr< QgsLabelFeature > > QgsPalLayerSettings::registerFeatureWithDetails | ( | const QgsFeature & | feature, |
| QgsRenderContext & | context, | ||
| QgsGeometry | obstacleGeometry = QgsGeometry(), | ||
| const QgsSymbol * | symbol = nullptr ) |
Registers a feature for labeling.
| feature | feature to label |
| context | render context. The QgsExpressionContext contained within the render context must have already had the feature and fields set prior to calling this method. |
| 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. |
| symbol | feature symbol to label (ownership is not transferred, and symbol must exist until the labeling is complete) |
nullptr if the feature will not be labeled in this context.Definition at line 2350 of file qgspallabeling.cpp.
| Qgis::AngleUnit QgsPalLayerSettings::rotationUnit | ( | ) | const |
Unit for rotation of labels.
Definition at line 628 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 1451 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 716 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 729 of file qgspallabeling.h.
|
inline |
setLegendString
| legendString | the string to show in the legend and preview |
Definition at line 630 of file qgspallabeling.h.
|
inline |
Sets the label line settings, which contain 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 777 of file qgspallabeling.h.
|
inline |
Sets the label obstacle settings.
Definition at line 830 of file qgspallabeling.h.
|
inline |
Sets the label placement settings.
Definition at line 874 of file qgspallabeling.h.
|
inline |
Sets the label point settings, which contain 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.
Definition at line 808 of file qgspallabeling.h.
|
inline |
Sets the polygon placement flags, which dictate how polygon labels can be placed.
Definition at line 416 of file qgspallabeling.h.
| void QgsPalLayerSettings::setRotationUnit | ( | Qgis::AngleUnit | angleUnit | ) |
Set unit for rotation of labels.
Definition at line 633 of file qgspallabeling.cpp.
|
inline |
Sets the label thinning settings.
Definition at line 852 of file qgspallabeling.h.
| void QgsPalLayerSettings::setUnplacedVisibility | ( | Qgis::UnplacedLabelVisibility | visibility | ) |
Sets the layer's unplaced label visibility.
Definition at line 1607 of file qgspallabeling.cpp.
| 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 546 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 583 of file qgspallabeling.cpp.
|
inline |
Returns the label thinning settings.
Definition at line 845 of file qgspallabeling.h.
|
inline |
Returns the label thinning settings.
Definition at line 838 of file qgspallabeling.h.
| QMimeData * QgsPalLayerSettings::toMimeData | ( | ) | const |
Returns new mime data representing the labeling settings.
Caller takes responsibility for deleting the returned object.
Definition at line 5090 of file qgspallabeling.cpp.
| Qgis::UnplacedLabelVisibility QgsPalLayerSettings::unplacedVisibility | ( | ) | const |
Returns the layer's unplaced label visibility.
Definition at line 1602 of file qgspallabeling.cpp.
| QDomElement QgsPalLayerSettings::writeXml | ( | QDomDocument & | doc, |
| const QgsReadWriteContext & | context ) const |
Write settings into a DOM element.
Definition at line 1293 of file qgspallabeling.cpp.
|
friend |
Definition at line 942 of file qgspallabeling.h.
| double QgsPalLayerSettings::angleOffset = 0 |
Label rotation, in degrees clockwise.
Definition at line 514 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 358 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 429 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 422 of file qgspallabeling.h.
| QgsCoordinateTransform QgsPalLayerSettings::ct |
Definition at line 926 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 388 of file qgspallabeling.h.
| double QgsPalLayerSettings::dist = 0 |
Distance from feature to the label.
Units are specified via distUnits.
Definition at line 441 of file qgspallabeling.h.
| QgsMapUnitScale QgsPalLayerSettings::distMapUnitScale |
Map unit scale for label feature distance.
Definition at line 455 of file qgspallabeling.h.
| Qgis::RenderUnit QgsPalLayerSettings::distUnits = Qgis::RenderUnit::Millimeters |
Units the distance from feature to the label.
Definition at line 448 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 311 of file qgspallabeling.h.
| QgsGeometry QgsPalLayerSettings::extentGeom |
Definition at line 930 of file qgspallabeling.h.
| int QgsPalLayerSettings::fieldIndex = 0 |
Definition at line 924 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 320 of file qgspallabeling.h.
| bool QgsPalLayerSettings::fitInPolygonOnly = false |
true if only labels which completely fit within a polygon are allowed.
Definition at line 434 of file qgspallabeling.h.
| bool QgsPalLayerSettings::fontLimitPixelSize = false |
true if label sizes should be limited by pixel size.
Definition at line 589 of file qgspallabeling.h.
| int QgsPalLayerSettings::fontMaxPixelSize = 10000 |
Maximum pixel size for showing rendered map unit labels (1 - 10000).
Definition at line 603 of file qgspallabeling.h.
| int QgsPalLayerSettings::fontMinPixelSize = 0 |
Minimum pixel size for showing rendered map unit labels (1 - 1000).
Definition at line 596 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 381 of file qgspallabeling.h.
| QString QgsPalLayerSettings::geometryGenerator |
The geometry generator expression. Null if disabled.
Definition at line 612 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 618 of file qgspallabeling.h.
| Qgis::GeometryType QgsPalLayerSettings::geometryGeneratorType = Qgis::GeometryType::Point |
The type of the result geometry of the geometry generator.
Definition at line 615 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 326 of file qgspallabeling.h.
| QgsMapUnitScale QgsPalLayerSettings::labelOffsetMapUnitScale |
Map unit scale for label offset.
Definition at line 511 of file qgspallabeling.h.
| Qgis::GeometryType QgsPalLayerSettings::layerType = Qgis::GeometryType::Unknown |
Geometry type of layers associated with these settings.
Definition at line 624 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 537 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 543 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 570 of file qgspallabeling.h.
| const QgsFeature* QgsPalLayerSettings::mCurFeat = nullptr |
Definition at line 922 of file qgspallabeling.h.
| QgsFields QgsPalLayerSettings::mCurFields |
Definition at line 923 of file qgspallabeling.h.
|
mutable |
Definition at line 934 of file qgspallabeling.h.
|
mutable |
Definition at line 933 of file qgspallabeling.h.
| int QgsPalLayerSettings::mFeaturesToLabel = 0 |
Definition at line 931 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 582 of file qgspallabeling.h.
| Qgis::LabelMultiLineAlignment QgsPalLayerSettings::multilineAlign = Qgis::LabelMultiLineAlignment::FollowPlacement |
Horizontal alignment of multi-line labels.
Definition at line 373 of file qgspallabeling.h.
| Qgis::LabelOffsetType QgsPalLayerSettings::offsetType = Qgis::LabelOffsetType::FromPoint |
Offset type for layer (only applies in certain placement modes).
Definition at line 458 of file qgspallabeling.h.
| Qgis::RenderUnit QgsPalLayerSettings::offsetUnits = Qgis::RenderUnit::Millimeters |
Units for offsets of label.
Definition at line 503 of file qgspallabeling.h.
| Qgis::LabelPlacement QgsPalLayerSettings::placement = Qgis::LabelPlacement::AroundPoint |
Label placement mode.
Definition at line 400 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 395 of file qgspallabeling.h.
| bool QgsPalLayerSettings::preserveRotation = true |
True if label rotation should be preserved during label pin/unpin operations.
Definition at line 517 of file qgspallabeling.h.
| Q_DECL_DEPRECATED QColor QgsPalLayerSettings::previewBkgrdColor = Qt::white |
Definition at line 336 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 549 of file qgspallabeling.h.
| QgsPointXY QgsPalLayerSettings::ptOne |
Definition at line 929 of file qgspallabeling.h.
| QgsPointXY QgsPalLayerSettings::ptZero |
Definition at line 928 of file qgspallabeling.h.
| double QgsPalLayerSettings::repeatDistance = 0 |
Distance for repeating labels for a single feature.
Definition at line 465 of file qgspallabeling.h.
| QgsMapUnitScale QgsPalLayerSettings::repeatDistanceMapUnitScale |
Map unit scale for repeating labels for a single feature.
Definition at line 479 of file qgspallabeling.h.
| Qgis::RenderUnit QgsPalLayerSettings::repeatDistanceUnit = Qgis::RenderUnit::Millimeters |
Units for repeating labels for a single feature.
Definition at line 472 of file qgspallabeling.h.
| bool QgsPalLayerSettings::scaleVisibility = false |
Set to true to limit label visibility to a range of scales.
Definition at line 558 of file qgspallabeling.h.
| QgsStringReplacementCollection QgsPalLayerSettings::substitutions |
Substitution collection for automatic text substitution with labels.
Definition at line 339 of file qgspallabeling.h.
| Qgis::UpsideDownLabelHandling QgsPalLayerSettings::upsidedownLabels = Qgis::UpsideDownLabelHandling::FlipUpsideDownLabels |
Controls whether upside down labels are displayed and how they are handled.
Definition at line 606 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 370 of file qgspallabeling.h.
| bool QgsPalLayerSettings::useSubstitutions = false |
True if substitutions should be applied.
Definition at line 341 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 349 of file qgspallabeling.h.
| const QgsMapToPixel* QgsPalLayerSettings::xform = nullptr |
Definition at line 925 of file qgspallabeling.h.
| double QgsPalLayerSettings::xOffset = 0 |
Horizontal offset of label.
Units are specified via offsetUnits.
Definition at line 487 of file qgspallabeling.h.
| double QgsPalLayerSettings::yOffset = 0 |
Vertical offset of label.
Units are specified via offsetUnits.
Definition at line 495 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 609 of file qgspallabeling.h.