QGIS API Documentation 3.41.0-Master (25ec5511245)
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
645 Q_DECL_DEPRECATED 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 ) SIP_DEPRECATED;
646
656 void registerFeature( const QgsFeature &f, QgsRenderContext &context );
657
658#ifndef SIP_RUN
659
676 std::unique_ptr< QgsLabelFeature > registerFeatureWithDetails( const QgsFeature &feature, QgsRenderContext &context,
677 QgsGeometry obstacleGeometry = QgsGeometry(), const QgsSymbol *symbol = nullptr );
678
679#endif
680
684 void readXml( const QDomElement &elem, const QgsReadWriteContext &context );
685
689 QDomElement writeXml( QDomDocument &doc, const QgsReadWriteContext &context ) const;
690
695 QgsPropertyCollection &dataDefinedProperties() { return mDataDefinedProperties; }
696
703 const QgsPropertyCollection &dataDefinedProperties() const SIP_SKIP { return mDataDefinedProperties; }
704
711 void setDataDefinedProperties( const QgsPropertyCollection &collection ) { mDataDefinedProperties = collection; }
712
717 const QgsTextFormat &format() const { return mFormat; }
718
724 void setFormat( const QgsTextFormat &format ) { mFormat = format; }
725
734 QgsCallout *callout() const { return mCallout.get(); }
735
744 void setCallout( QgsCallout *callout SIP_TRANSFER );
745
754 const QgsLabelLineSettings &lineSettings() const { return mLineSettings; } SIP_SKIP
755
763 QgsLabelLineSettings &lineSettings() { return mLineSettings; }
764
772 void setLineSettings( const QgsLabelLineSettings &settings ) { mLineSettings = settings; }
773
783 const QgsLabelPointSettings &pointSettings() const { return mPointSettings; } SIP_SKIP
784
793 QgsLabelPointSettings &pointSettings() { return mPointSettings; }
794
803 void setPointSettings( const QgsLabelPointSettings &settings ) { mPointSettings = settings; }
804
811 const QgsLabelObstacleSettings &obstacleSettings() const { return mObstacleSettings; } SIP_SKIP
812
818 QgsLabelObstacleSettings &obstacleSettings() { return mObstacleSettings; }
819
825 void setObstacleSettings( const QgsLabelObstacleSettings &settings ) { mObstacleSettings = settings; }
826
833 const QgsLabelThinningSettings &thinningSettings() const { return mThinningSettings; } SIP_SKIP
834
840 QgsLabelThinningSettings &thinningSettings() { return mThinningSettings; }
841
847 void setThinningSettings( const QgsLabelThinningSettings &settings ) { mThinningSettings = settings; }
848
855 const QgsLabelPlacementSettings &placementSettings() const { return mPlacementSettings; } SIP_SKIP
856
862 QgsLabelPlacementSettings &placementSettings() { return mPlacementSettings; }
863
869 void setPlacementSettings( const QgsLabelPlacementSettings &settings ) { mPlacementSettings = settings; }
870
880 static QPixmap labelSettingsPreviewPixmap( const QgsPalLayerSettings &settings, QSize size, const QString &previewText = QString(), int padding = 0, const QgsScreenProperties &screen = QgsScreenProperties() );
881
888 Qgis::UnplacedLabelVisibility unplacedVisibility() const;
889
896 void setUnplacedVisibility( Qgis::UnplacedLabelVisibility visibility );
897
898 // temporary stuff: set when layer gets prepared or labeled
899 const QgsFeature *mCurFeat = nullptr;
901 int fieldIndex = 0;
902 const QgsMapToPixel *xform = nullptr;
904
908 int mFeaturesToLabel = 0; // total features that will probably be labeled, may be less (figured before PAL)
909 int mFeatsSendingToPal = 0; // total features tested for sending into PAL (relative to maxNumLabels)
910 int mFeatsRegPal = 0; // number of features registered in PAL, when using limitNumLabels
911
912 private:
913
914 friend class QgsVectorLayer; // to allow calling readFromLayerCustomProperties()
915
919 void readFromLayerCustomProperties( QgsVectorLayer *layer );
920
924 void readOldDataDefinedPropertyMap( QgsVectorLayer *layer, QDomElement *parentElem );
925
929 void readOldDataDefinedProperty( QgsVectorLayer *layer, QgsPalLayerSettings::Property p );
930
938 void calculateLabelSize( const QFontMetricsF &fm, const QString &text, QgsRenderContext &context,
939 const QgsTextFormat &format,
940 QgsTextDocument *document,
941 QgsTextDocumentMetrics *documentMetrics,
942 QSizeF &size, QSizeF &rotatedSize,
943 QRectF &outerBounds );
944
945
946 enum DataDefinedValueType
947 {
948 DDBool,
949 DDInt,
950 DDIntPos,
951 DDDouble,
952 DDDoublePos,
953 DDRotation180,
954 DDOpacity,
955 DDString,
956 DDUnits,
957 DDColor,
958 DDJoinStyle,
959 DDBlendMode,
960 DDPointF,
961 DDSizeF,
962 };
963
964 // convenience data defined evaluation function
965 bool dataDefinedValEval( DataDefinedValueType valType,
967 QVariant &exprVal, QgsExpressionContext &context, const QVariant &originalValue = QVariant() );
968
969 void parseTextStyle( QFont &labelFont,
970 Qgis::RenderUnit fontunits,
971 QgsRenderContext &context );
972
973 void parseTextBuffer( QgsRenderContext &context );
974
975 void parseTextMask( QgsRenderContext &context );
976
977 void parseTextFormatting( QgsRenderContext &context );
978
979 void parseShapeBackground( QgsRenderContext &context );
980
981 void parseDropShadow( QgsRenderContext &context );
982
987 bool checkMinimumSizeMM( const QgsRenderContext &ct, const QgsGeometry &geom, double minSize ) const;
988
992 std::unique_ptr< QgsLabelFeature > registerObstacleFeature( const QgsFeature &f, QgsRenderContext &context, const QgsGeometry &obstacleGeometry = QgsGeometry() );
993
994 QMap<Property, QVariant> dataDefinedValues;
995
997 QgsPropertyCollection mDataDefinedProperties;
998
999 QgsExpression *expression = nullptr;
1000
1001 std::unique_ptr< QFontDatabase > mFontDB;
1002
1003 QgsTextFormat mFormat;
1004
1005 std::unique_ptr< QgsCallout > mCallout;
1006
1007 QgsLabelPlacementSettings mPlacementSettings;
1008 QgsLabelLineSettings mLineSettings;
1009 QgsLabelPointSettings mPointSettings;
1010 QgsLabelObstacleSettings mObstacleSettings;
1011 QgsLabelThinningSettings mThinningSettings;
1012
1014
1015 QgsExpression mGeometryGeneratorExpression;
1016
1017 bool mRenderStarted = false;
1018
1019 QString mLegendString = QObject::tr( "Aa" );
1020
1022
1025
1026 static void initPropertyDefinitions();
1027};
1028
1033class CORE_EXPORT QgsLabelCandidate
1034{
1035 public:
1036 QgsLabelCandidate( const QRectF &r, double c ): rect( r ), cost( c ) {}
1037
1038 QRectF rect;
1039 double cost;
1040};
1041
1047class CORE_EXPORT QgsPalLabeling
1048{
1049 public:
1050
1054 static bool staticWillUseLayer( const QgsMapLayer *layer );
1055
1057 static void drawLabelCandidateRect( pal::LabelPosition *lp, QPainter *painter, const QgsMapToPixel *xform, QList<QgsLabelCandidate> *candidates = nullptr ) SIP_SKIP;
1058
1068 static QgsGeometry prepareGeometry( const QgsGeometry &geometry, QgsRenderContext &context, const QgsCoordinateTransform &ct, const QgsGeometry &clipGeometry = QgsGeometry(), bool mergeLines = false ) SIP_FACTORY;
1069
1079 static bool geometryRequiresPreparation( const QgsGeometry &geometry, QgsRenderContext &context, const QgsCoordinateTransform &ct, const QgsGeometry &clipGeometry = QgsGeometry(), bool mergeLines = false );
1080
1092 static QStringList splitToLines( const QString &text, const QString &wrapCharacter, int autoWrapLength = 0, bool useMaxLineLengthWhenAutoWrapping = true );
1093
1101 static QStringList splitToGraphemes( const QString &text );
1102
1103 private:
1105 static void dataDefinedTextStyle( QgsPalLayerSettings &tmpLyr,
1106 const QMap< QgsPalLayerSettings::Property, QVariant > &ddValues );
1107
1109 static void dataDefinedTextFormatting( QgsPalLayerSettings &tmpLyr,
1110 const QMap< QgsPalLayerSettings::Property, QVariant > &ddValues );
1111
1113 static void dataDefinedTextBuffer( QgsPalLayerSettings &tmpLyr,
1114 const QMap< QgsPalLayerSettings::Property, QVariant > &ddValues );
1115
1117 static void dataDefinedTextMask( QgsPalLayerSettings &tmpLyr,
1118 const QMap< QgsPalLayerSettings::Property, QVariant > &ddValues );
1119
1121 static void dataDefinedShapeBackground( QgsPalLayerSettings &tmpLyr,
1122 const QMap< QgsPalLayerSettings::Property, QVariant > &ddValues );
1123
1125 static void dataDefinedDropShadow( QgsPalLayerSettings &tmpLyr,
1126 const QMap< QgsPalLayerSettings::Property, QVariant > &ddValues );
1127
1128 friend class QgsVectorLayerLabelProvider; // to allow calling the static methods above
1129 friend class QgsDxfExport; // to allow calling the static methods above
1130
1138 static bool checkMinimumSizeMM( const QgsRenderContext &context, const QgsGeometry &geom, double minSize );
1139
1141};
1142
1143
1144#endif // QGSPALLABELING_H
AngleUnit
Units of angles.
Definition qgis.h:4794
@ Degrees
Degrees.
LabelOffsetType
Behavior modifier for label offset and distance, only applies in some label placement modes.
Definition qgis.h:1172
@ FromPoint
Offset distance applies from point geometry.
LabelPlacement
Placement modes which determine how label candidates are generated for a feature.
Definition qgis.h:1125
@ 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:1243
UnplacedLabelVisibility
Unplaced label visibility.
Definition qgis.h:1086
@ FollowEngineSetting
Respect the label engine setting.
GeometryType
The geometry types are used to group Qgis::WkbType in a coarse way.
Definition qgis.h:337
@ Unknown
Unknown types.
LabelMultiLineAlignment
Text alignment for multi-line labels.
Definition qgis.h:1269
@ 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:4839
@ Millimeters
Millimeters.
UpsideDownLabelHandling
Handling techniques for upside down labels.
Definition qgis.h:1254
@ FlipUpsideDownLabels
Upside-down labels (90 <= angle < 270) are shown upright.
Abstract base class for callout renderers.
Definition qgscallout.h:54
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:76
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:231
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_DEPRECATED
Definition qgis_sip.h:106
#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