QGIS API Documentation 3.38.0-Grenoble (exported)
Loading...
Searching...
No Matches
qgspallabeling.h
Go to the documentation of this file.
1/***************************************************************************
2 qgspallabeling.h
3 Smart labeling for vector layers
4 -------------------
5 begin : June 2009
6 copyright : (C) Martin Dobias
7 email : wonder dot sk at gmail dot com
8
9 ***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#ifndef QGSPALLABELING_H
19#define QGSPALLABELING_H
20
21#include "qgis_core.h"
22#include "qgis_sip.h"
23#include <QString>
24#include <QFont>
25#include <QFontDatabase>
26#include <QColor>
27#include <QHash>
28#include <QList>
29#include <QPainter>
30#include <QRectF>
31#include <QMap>
32#include "qgsfeature.h"
33#include "qgsgeometry.h"
34#include "qgsfields.h"
35#include "qgspointxy.h"
36#include "qgsmapunitscale.h"
37#include "qgsstringutils.h"
38#include "qgstextformat.h"
46#include "qgsexpression.h"
47
48class QgsTextDocument;
50
51namespace pal SIP_SKIP
52{
53 class Pal;
54 class Layer;
55 class LabelPosition;
56}
57
59class QgsRectangle;
60class QgsMapToPixel;
61class QgsFeature;
63class QgsVectorLayer;
64class QgsExpression;
65class QFontMetricsF;
66class QPainter;
67class QPicture;
68class QgsGeometry;
71class QgsMapLayer;
72class QgsMapSettings;
73class QgsLabelFeature;
77class QgsDxfExport;
80class QgsCallout;
81
87class CORE_EXPORT QgsPalLayerSettings
88{
89 public:
93
95 QgsPalLayerSettings &operator=( const QgsPalLayerSettings &s );
96
97 // *INDENT-OFF*
100 {
101 // text style
102 Size = 0,
103 Bold = 1,
104 Italic = 2,
105 Underline = 3,
106 Color = 4,
107 Strikeout = 5,
108 Family = 6,
109 FontStyle = 21,
110 FontSizeUnit = 22,
111 FontTransp = 18,
112 FontOpacity = 92,
113 FontCase = 27,
114 FontLetterSpacing = 28,
115 FontWordSpacing = 29,
116 FontBlendMode = 30,
117 FontStretchFactor = 113,
118
119 // text formatting
120 MultiLineWrapChar = 31,
121 AutoWrapLength = 101,
122 MultiLineHeight = 32,
123 MultiLineAlignment = 33,
124 TextOrientation = 110,
125 TabStopDistance = 120,
126 DirSymbDraw = 34,
127 DirSymbLeft = 35,
128 DirSymbRight = 36,
129 DirSymbPlacement = 37,
130 DirSymbReverse = 38,
131 NumFormat = 39,
132 NumDecimals = 40,
133 NumPlusSign = 41,
134
135 // text buffer
136 BufferDraw = 42,
137 BufferSize = 7,
138 BufferUnit = 43,
139 BufferColor = 8,
140 BufferTransp = 19,
141 BufferOpacity = 94,
142 BufferJoinStyle = 44,
143 BufferBlendMode = 45,
144
145 // mask buffer
146 MaskEnabled = 104,
147 MaskBufferSize = 105,
148 MaskBufferUnit = 106,
149 MaskOpacity = 107,
150 MaskJoinStyle = 108,
151
152 // background
153 ShapeDraw = 46,
154 ShapeKind = 47,
155 ShapeSVGFile = 48,
156 ShapeSizeType = 49,
157 ShapeSizeX = 50,
158 ShapeSizeY = 85,
159 ShapeSizeUnits = 51,
160 ShapeRotationType = 52,
161 ShapeRotation = 53,
162 ShapeOffset = 54,
163 ShapeOffsetUnits = 55,
164 ShapeRadii = 56,
165 ShapeRadiiUnits = 57,
166 ShapeTransparency = 63,
167 ShapeOpacity = 93,
168 ShapeBlendMode = 64,
169 ShapeFillColor = 58,
170 ShapeStrokeColor = 59,
171 ShapeStrokeWidth = 60,
172 ShapeStrokeWidthUnits = 61,
173 ShapeJoinStyle = 62,
174
175 // drop shadow
176 ShadowDraw = 65,
177 ShadowUnder = 66,
178 ShadowOffsetAngle = 67,
179 ShadowOffsetDist = 68,
180 ShadowOffsetUnits = 69,
181 ShadowRadius = 70,
182 ShadowRadiusUnits = 71,
183 ShadowTransparency = 72,
184 ShadowOpacity = 95,
185 ShadowScale = 73,
186 ShadowColor = 74,
187 ShadowBlendMode = 75,
188
189 // placement
190 CentroidWhole = 76,
191 OffsetQuad = 77,
192 OffsetXY = 78,
193 OffsetUnits = 80,
194 LabelDistance = 13,
195 MaximumDistance = 119,
196 DistanceUnits = 81,
197 OffsetRotation = 82,
198 CurvedCharAngleInOut = 83,
199 // (data defined only)
200 PositionX = 9,
201 PositionY = 10,
202 PositionPoint = 114,
203 Hali = 11,
204 Vali = 12,
205 Rotation = 14,
206 LabelRotation = 96,
207 RepeatDistance = 84,
208 RepeatDistanceUnit = 86,
209 Priority = 87,
210 PredefinedPositionOrder = 91,
211 LinePlacementOptions = 99,
212 OverrunDistance = 102,
213 LabelAllParts = 103,
214 PolygonLabelOutside = 109,
215 LineAnchorPercent = 111,
216 LineAnchorClipping = 112,
217 LineAnchorType = 115,
218 LineAnchorTextPoint = 116,
219
220 // rendering
221 ScaleVisibility = 23,
222 MinScale = 16,
223 MinimumScale = 97,
224 MaxScale = 17,
225 MaximumScale = 98,
226 FontLimitPixel = 24,
227 FontMinPixel = 25,
228 FontMaxPixel = 26,
229 IsObstacle = 88,
230 ObstacleFactor = 89,
231 ZIndex = 90,
232 CalloutDraw = 100,
233
234 AllowDegradedPlacement = 117,
235 OverlapHandling = 118,
236
237 // (data defined only)
238 Show = 15,
239 AlwaysShow = 20
240 };
241 // *INDENT-ON*
242
254 bool prepare( QgsRenderContext &context, QSet<QString> &attributeNames SIP_INOUT, const QgsFields &fields, const QgsMapSettings &mapSettings, const QgsCoordinateReferenceSystem &crs );
255
260 QSet<QString> referencedFields( const QgsRenderContext &context ) const;
261
270 void startRender( QgsRenderContext &context );
271
279 void stopRender( QgsRenderContext &context );
280
286 bool containsAdvancedEffects() const;
287
291 static const QgsPropertiesDefinition &propertyDefinitions();
292
300 bool drawLabels = true;
301
302 //-- text style
303
309 QString fieldName;
310
315 bool isExpression = false;
316
320 QgsExpression *getLabelExpression();
321
325 Q_DECL_DEPRECATED QColor previewBkgrdColor = Qt::white;
326
330 bool useSubstitutions = false;
331
332 //-- text formatting
333
338 QString wrapChar;
339
347 int autoWrapLength = 0;
348
359 bool useMaxLineLengthForAutoWrap = true;
360
363
370 bool formatNumbers = false;
371
377 int decimals = 3;
378
384 bool plusSign = false;
385
386 //-- placement
387
390
397 Qgis::LabelPolygonPlacementFlags polygonPlacementFlags() const { return mPolygonPlacementFlags; }
398
405 void setPolygonPlacementFlags( Qgis::LabelPolygonPlacementFlags flags ) { mPolygonPlacementFlags = flags; }
406
411 bool centroidWhole = false;
412
418 bool centroidInside = false;
419
423 bool fitInPolygonOnly = false;
424
430 double dist = 0;
431
438
445
448
454 double repeatDistance = 0;
455
462
469
476 double xOffset = 0;
477
484 double yOffset = 0;
485
493
501
503 double angleOffset = 0;
504
506 bool preserveRotation = true;
507
513 Qgis::AngleUnit rotationUnit() const;
514
520 void setRotationUnit( Qgis::AngleUnit angleUnit );
521
526 double maxCurvedCharAngleIn = 25.0;
527
532 double maxCurvedCharAngleOut = -25.0;
533
538 int priority = 5;
539
540 //-- rendering
541
547 bool scaleVisibility = false;
548
559 double maximumScale = 0;
560
571 double minimumScale = 0;
572
578 bool fontLimitPixelSize = false;
579
585 int fontMinPixelSize = 0;
586
592 int fontMaxPixelSize = 10000;
593
596
601 bool labelPerPart = false;
602
604 double zIndex = 0;
605
608
611
613 bool geometryGeneratorEnabled = false;
614
620
625 void setLegendString( const QString &legendString ) { mLegendString = legendString; }
626
631 QString legendString() const { return mLegendString; }
632
639#ifndef SIP_RUN
640 void calculateLabelSize( const QFontMetricsF *fm, const QString &text, double &labelX, double &labelY, const QgsFeature *f = nullptr, QgsRenderContext *context = nullptr, double *rotatedLabelX SIP_OUT = nullptr, double *rotatedLabelY SIP_OUT = nullptr,
641 QgsTextFormat *format = nullptr, QgsTextDocument *document = nullptr, QgsTextDocumentMetrics *documentMetrics = nullptr, QRectF *outerBounds = nullptr );
642#else
643 void calculateLabelSize( const QFontMetricsF *fm, const QString &text, double &labelX, double &labelY, const QgsFeature *f = nullptr, QgsRenderContext *context = nullptr, double *rotatedLabelX SIP_OUT = nullptr, double *rotatedLabelY SIP_OUT = nullptr );
644#endif
645
655 void registerFeature( const QgsFeature &f, QgsRenderContext &context );
656
657#ifndef SIP_RUN
658
675 std::unique_ptr< QgsLabelFeature > registerFeatureWithDetails( const QgsFeature &feature, QgsRenderContext &context,
676 QgsGeometry obstacleGeometry = QgsGeometry(), const QgsSymbol *symbol = nullptr );
677#endif
678
682 void readXml( const QDomElement &elem, const QgsReadWriteContext &context );
683
687 QDomElement writeXml( QDomDocument &doc, const QgsReadWriteContext &context ) const;
688
693 QgsPropertyCollection &dataDefinedProperties() { return mDataDefinedProperties; }
694
701 const QgsPropertyCollection &dataDefinedProperties() const SIP_SKIP { return mDataDefinedProperties; }
702
709 void setDataDefinedProperties( const QgsPropertyCollection &collection ) { mDataDefinedProperties = collection; }
710
715 const QgsTextFormat &format() const { return mFormat; }
716
722 void setFormat( const QgsTextFormat &format ) { mFormat = format; }
723
732 QgsCallout *callout() const { return mCallout.get(); }
733
742 void setCallout( QgsCallout *callout SIP_TRANSFER );
743
752 const QgsLabelLineSettings &lineSettings() const { return mLineSettings; } SIP_SKIP
753
761 QgsLabelLineSettings &lineSettings() { return mLineSettings; }
762
770 void setLineSettings( const QgsLabelLineSettings &settings ) { mLineSettings = settings; }
771
781 const QgsLabelPointSettings &pointSettings() const { return mPointSettings; } SIP_SKIP
782
791 QgsLabelPointSettings &pointSettings() { return mPointSettings; }
792
801 void setPointSettings( const QgsLabelPointSettings &settings ) { mPointSettings = settings; }
802
809 const QgsLabelObstacleSettings &obstacleSettings() const { return mObstacleSettings; } SIP_SKIP
810
816 QgsLabelObstacleSettings &obstacleSettings() { return mObstacleSettings; }
817
823 void setObstacleSettings( const QgsLabelObstacleSettings &settings ) { mObstacleSettings = settings; }
824
831 const QgsLabelThinningSettings &thinningSettings() const { return mThinningSettings; } SIP_SKIP
832
838 QgsLabelThinningSettings &thinningSettings() { return mThinningSettings; }
839
845 void setThinningSettings( const QgsLabelThinningSettings &settings ) { mThinningSettings = settings; }
846
853 const QgsLabelPlacementSettings &placementSettings() const { return mPlacementSettings; } SIP_SKIP
854
860 QgsLabelPlacementSettings &placementSettings() { return mPlacementSettings; }
861
867 void setPlacementSettings( const QgsLabelPlacementSettings &settings ) { mPlacementSettings = settings; }
868
878 static QPixmap labelSettingsPreviewPixmap( const QgsPalLayerSettings &settings, QSize size, const QString &previewText = QString(), int padding = 0, const QgsScreenProperties &screen = QgsScreenProperties() );
879
886 Qgis::UnplacedLabelVisibility unplacedVisibility() const;
887
894 void setUnplacedVisibility( Qgis::UnplacedLabelVisibility visibility );
895
896 // temporary stuff: set when layer gets prepared or labeled
897 const QgsFeature *mCurFeat = nullptr;
899 int fieldIndex = 0;
900 const QgsMapToPixel *xform = nullptr;
902
906 int mFeaturesToLabel = 0; // total features that will probably be labeled, may be less (figured before PAL)
907 int mFeatsSendingToPal = 0; // total features tested for sending into PAL (relative to maxNumLabels)
908 int mFeatsRegPal = 0; // number of features registered in PAL, when using limitNumLabels
909
910 private:
911
912 friend class QgsVectorLayer; // to allow calling readFromLayerCustomProperties()
913
917 void readFromLayerCustomProperties( QgsVectorLayer *layer );
918
922 void readOldDataDefinedPropertyMap( QgsVectorLayer *layer, QDomElement *parentElem );
923
927 void readOldDataDefinedProperty( QgsVectorLayer *layer, QgsPalLayerSettings::Property p );
928
929 enum DataDefinedValueType
930 {
931 DDBool,
932 DDInt,
933 DDIntPos,
934 DDDouble,
935 DDDoublePos,
936 DDRotation180,
937 DDOpacity,
938 DDString,
939 DDUnits,
940 DDColor,
941 DDJoinStyle,
942 DDBlendMode,
943 DDPointF,
944 DDSizeF,
945 };
946
947 // convenience data defined evaluation function
948 bool dataDefinedValEval( DataDefinedValueType valType,
950 QVariant &exprVal, QgsExpressionContext &context, const QVariant &originalValue = QVariant() );
951
952 void parseTextStyle( QFont &labelFont,
953 Qgis::RenderUnit fontunits,
954 QgsRenderContext &context );
955
956 void parseTextBuffer( QgsRenderContext &context );
957
958 void parseTextMask( QgsRenderContext &context );
959
960 void parseTextFormatting( QgsRenderContext &context );
961
962 void parseShapeBackground( QgsRenderContext &context );
963
964 void parseDropShadow( QgsRenderContext &context );
965
970 bool checkMinimumSizeMM( const QgsRenderContext &ct, const QgsGeometry &geom, double minSize ) const;
971
975 std::unique_ptr< QgsLabelFeature > registerObstacleFeature( const QgsFeature &f, QgsRenderContext &context, const QgsGeometry &obstacleGeometry = QgsGeometry() );
976
977 QMap<Property, QVariant> dataDefinedValues;
978
980 QgsPropertyCollection mDataDefinedProperties;
981
982 QgsExpression *expression = nullptr;
983
984 std::unique_ptr< QFontDatabase > mFontDB;
985
986 QgsTextFormat mFormat;
987
988 std::unique_ptr< QgsCallout > mCallout;
989
990 QgsLabelPlacementSettings mPlacementSettings;
991 QgsLabelLineSettings mLineSettings;
992 QgsLabelPointSettings mPointSettings;
993 QgsLabelObstacleSettings mObstacleSettings;
994 QgsLabelThinningSettings mThinningSettings;
995
997
998 QgsExpression mGeometryGeneratorExpression;
999
1000 bool mRenderStarted = false;
1001
1002 QString mLegendString = QObject::tr( "Aa" );
1003
1005
1008
1009 static void initPropertyDefinitions();
1010};
1011
1016class CORE_EXPORT QgsLabelCandidate
1017{
1018 public:
1019 QgsLabelCandidate( const QRectF &r, double c ): rect( r ), cost( c ) {}
1020
1021 QRectF rect;
1022 double cost;
1023};
1024
1030class CORE_EXPORT QgsPalLabeling
1031{
1032 public:
1033
1037 static bool staticWillUseLayer( const QgsMapLayer *layer );
1038
1040 static void drawLabelCandidateRect( pal::LabelPosition *lp, QPainter *painter, const QgsMapToPixel *xform, QList<QgsLabelCandidate> *candidates = nullptr ) SIP_SKIP;
1041
1051 static QgsGeometry prepareGeometry( const QgsGeometry &geometry, QgsRenderContext &context, const QgsCoordinateTransform &ct, const QgsGeometry &clipGeometry = QgsGeometry(), bool mergeLines = false ) SIP_FACTORY;
1052
1062 static bool geometryRequiresPreparation( const QgsGeometry &geometry, QgsRenderContext &context, const QgsCoordinateTransform &ct, const QgsGeometry &clipGeometry = QgsGeometry(), bool mergeLines = false );
1063
1075 static QStringList splitToLines( const QString &text, const QString &wrapCharacter, int autoWrapLength = 0, bool useMaxLineLengthWhenAutoWrapping = true );
1076
1084 static QStringList splitToGraphemes( const QString &text );
1085
1086 private:
1088 static void dataDefinedTextStyle( QgsPalLayerSettings &tmpLyr,
1089 const QMap< QgsPalLayerSettings::Property, QVariant > &ddValues );
1090
1092 static void dataDefinedTextFormatting( QgsPalLayerSettings &tmpLyr,
1093 const QMap< QgsPalLayerSettings::Property, QVariant > &ddValues );
1094
1096 static void dataDefinedTextBuffer( QgsPalLayerSettings &tmpLyr,
1097 const QMap< QgsPalLayerSettings::Property, QVariant > &ddValues );
1098
1100 static void dataDefinedTextMask( QgsPalLayerSettings &tmpLyr,
1101 const QMap< QgsPalLayerSettings::Property, QVariant > &ddValues );
1102
1104 static void dataDefinedShapeBackground( QgsPalLayerSettings &tmpLyr,
1105 const QMap< QgsPalLayerSettings::Property, QVariant > &ddValues );
1106
1108 static void dataDefinedDropShadow( QgsPalLayerSettings &tmpLyr,
1109 const QMap< QgsPalLayerSettings::Property, QVariant > &ddValues );
1110
1111 friend class QgsVectorLayerLabelProvider; // to allow calling the static methods above
1112 friend class QgsDxfExport; // to allow calling the static methods above
1113
1121 static bool checkMinimumSizeMM( const QgsRenderContext &context, const QgsGeometry &geom, double minSize );
1122
1124};
1125
1126
1127#endif // QGSPALLABELING_H
AngleUnit
Units of angles.
Definition qgis.h:4444
@ Degrees
Degrees.
LabelOffsetType
Behavior modifier for label offset and distance, only applies in some label placement modes.
Definition qgis.h:992
@ FromPoint
Offset distance applies from point geometry.
LabelPlacement
Placement modes which determine how label candidates are generated for a feature.
Definition qgis.h:945
@ AroundPoint
Arranges candidates in a circle around a point (or centroid of a polygon). Applies to point or polygo...
@ AllowPlacementInsideOfPolygon
Labels can be placed inside a polygon feature.
QFlags< LabelPolygonPlacementFlag > LabelPolygonPlacementFlags
Polygon placement flags, which control how candidates are generated for a polygon feature.
Definition qgis.h:1063
UnplacedLabelVisibility
Unplaced label visibility.
Definition qgis.h:906
@ FollowEngineSetting
Respect the label engine setting.
GeometryType
The geometry types are used to group Qgis::WkbType in a coarse way.
Definition qgis.h:274
@ Unknown
Unknown types.
LabelMultiLineAlignment
Text alignment for multi-line labels.
Definition qgis.h:1089
@ FollowPlacement
Alignment follows placement of label, e.g., labels to the left of a feature will be drawn with right ...
RenderUnit
Rendering size units.
Definition qgis.h:4489
@ Millimeters
Millimeters.
UpsideDownLabelHandling
Handling techniques for upside down labels.
Definition qgis.h:1074
@ FlipUpsideDownLabels
Upside-down labels (90 <= angle < 270) are shown upright.
Abstract base class for callout renderers.
Definition qgscallout.h:53
This class represents a coordinate reference system (CRS).
Class for doing transforms between two map coordinate systems.
Stores the settings for rendering of all diagrams for a layer.
Exports QGIS layers to the DXF format.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Class for parsing and evaluation of expressions (formerly called "search strings").
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Definition qgsfeature.h:58
Container of fields for a vector layer.
Definition qgsfields.h:46
A geometry is the spatial representation of a feature.
Represents a label candidate.
QgsLabelCandidate(const QRectF &r, double c)
The QgsLabelFeature class describes a feature that should be used within the labeling engine.
Contains settings related to how the label engine places and formats labels for line features (or pol...
Contains settings related to how the label engine treats features as obstacles.
Contains general settings related to how labels are placed.
Contains settings related to how the label engine places and formats labels for point features,...
A class to query the labeling structure at a given point (small wrapper around pal RTree class)
Contains settings related to how the label engine removes candidate label positions and reduces the n...
The QgsLabelingEngine class provides map labeling functionality.
Base class for all map layer types.
Definition qgsmaplayer.h:75
The QgsMapSettings class contains configuration for rendering of the map.
Perform transforms between map coordinates and device coordinates.
Struct for storing maximum and minimum scales for measurements in map units.
PAL labeling utilities.
Contains settings for how a map layer will be labeled.
QgsMapUnitScale labelOffsetMapUnitScale
Map unit scale for label offset.
const QgsLabelObstacleSettings & obstacleSettings() const
Returns the label obstacle settings.
void setObstacleSettings(const QgsLabelObstacleSettings &settings)
Sets the label obstacle settings.
const QgsPropertyCollection & dataDefinedProperties() const
Returns a reference to the label's property collection, used for data defined overrides.
const QgsLabelPlacementSettings & placementSettings() const
Returns the label placement settings.
void setFormat(const QgsTextFormat &format)
Sets the label text formatting settings, e.g., font settings, buffer settings, etc.
void setPolygonPlacementFlags(Qgis::LabelPolygonPlacementFlags flags)
Sets the polygon placement flags, which dictate how polygon labels can be placed.
QString wrapChar
Wrapping character string.
QgsCoordinateTransform ct
QString legendString() const
legendString
QgsLabelPointSettings & pointSettings()
Returns the label point settings, which contain settings related to how the label engine places and f...
void setLineSettings(const QgsLabelLineSettings &settings)
Sets the label line settings, which contain settings related to how the label engine places and forma...
QgsPropertyCollection & dataDefinedProperties()
Returns a reference to the label's property collection, used for data defined overrides.
QgsLabelLineSettings & lineSettings()
Returns the label line settings, which contain settings related to how the label engine places and fo...
QgsCallout * callout() const
Returns the label callout renderer, responsible for drawing label callouts.
const QgsLabelThinningSettings & thinningSettings() const
Returns the label thinning settings.
void setLegendString(const QString &legendString)
setLegendString
void setThinningSettings(const QgsLabelThinningSettings &settings)
Sets the label thinning settings.
void setDataDefinedProperties(const QgsPropertyCollection &collection)
Sets the label's property collection, used for data defined overrides.
void setPlacementSettings(const QgsLabelPlacementSettings &settings)
Sets the label placement settings.
QgsLabelThinningSettings & thinningSettings()
Returns the label thinning settings.
QString geometryGenerator
The geometry generator expression. Null if disabled.
const QgsLabelLineSettings & lineSettings() const
Returns the label line settings, which contain settings related to how the label engine places and fo...
QgsMapUnitScale distMapUnitScale
Map unit scale for label feature distance.
QgsStringReplacementCollection substitutions
Substitution collection for automatic text substitution with labels.
QgsMapUnitScale repeatDistanceMapUnitScale
Map unit scale for repeating labels for a single feature.
Property
Data definable properties.
QString fieldName
Name of field (or an expression) to use for label text.
void setPointSettings(const QgsLabelPointSettings &settings)
Sets the label point settings, which contain settings related to how the label engine places and form...
const QgsTextFormat & format() const
Returns the label text formatting settings, e.g., font settings, buffer settings, etc.
QgsLabelPlacementSettings & placementSettings()
Returns the label placement settings.
const QgsLabelPointSettings & pointSettings() const
Returns the label point settings, which contain settings related to how the label engine places and f...
Qgis::LabelPolygonPlacementFlags polygonPlacementFlags() const
Returns the polygon placement flags, which dictate how polygon labels can be placed.
QgsLabelObstacleSettings & obstacleSettings()
Returns the label obstacle settings.
A class to represent a 2D point.
Definition qgspointxy.h:60
A grouped map of multiple QgsProperty objects, each referenced by a integer key value.
The class is used as a container of context for various read/write operations on other objects.
A rectangle specified with double values.
Contains information about the context of a rendering operation.
Stores properties relating to a screen.
A collection of string replacements (specified using QgsStringReplacement objects).
Abstract base class for all rendered symbols.
Definition qgssymbol.h:94
Contains pre-calculated metrics of a QgsTextDocument.
Represents a document consisting of one or more QgsTextBlock objects.
Container for all settings relating to text rendering.
Class that adds extra information to QgsLabelFeature for text labels.
The QgsVectorLayerDiagramProvider class implements support for diagrams within the labeling engine.
The QgsVectorLayerLabelProvider class implements a label provider for vector layers.
Represents a vector layer which manages a vector based data sets.
LabelPosition is a candidate feature label position.
As part of the API refactoring and improvements which landed in the Processing API was substantially reworked from the x version This was done in order to allow much of the underlying Processing framework to be ported into c
#define SIP_SKIP
Definition qgis_sip.h:126
#define SIP_MONKEYPATCH_SCOPEENUM_UNNEST(OUTSIDE_CLASS, FORMERNAME)
Definition qgis_sip.h:271
#define SIP_TRANSFER
Definition qgis_sip.h:36
#define SIP_OUT
Definition qgis_sip.h:58
#define SIP_FACTORY
Definition qgis_sip.h:76
#define SIP_INOUT
Definition qgis_sip.h:71
QMap< int, QgsPropertyDefinition > QgsPropertiesDefinition
Definition of available properties.
const QgsCoordinateReferenceSystem & crs