QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
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 //Note: although this file is in the core library, it is not part of the stable API
19 //and might change at any time!
20 
21 #ifndef QGSPALLABELING_H
22 #define QGSPALLABELING_H
23 
24 #include "qgis_core.h"
25 #include "qgis_sip.h"
26 #include <QString>
27 #include <QFont>
28 #include <QFontDatabase>
29 #include <QColor>
30 #include <QHash>
31 #include <QList>
32 #include <QPainter>
33 #include <QRectF>
34 #include <QMap>
35 #include "qgsfeature.h"
36 #include "qgsgeometry.h"
37 #include "qgsfields.h"
39 #include "qgspointxy.h"
40 #include "qgsmapunitscale.h"
41 #include "qgsstringutils.h"
42 #include "qgssymbol.h"
43 #include "qgstextformat.h"
44 #include "qgspropertycollection.h"
47 #include "qgslabellinesettings.h"
48 #include "qgslabeling.h"
49 
50 class QgsTextDocument;
51 
52 namespace pal SIP_SKIP
53 {
54  class Pal;
55  class Layer;
56  class LabelPosition;
57 }
58 
60 class QgsRectangle;
61 class QgsMapToPixel;
62 class QgsFeature;
64 class QgsVectorLayer;
65 class QgsExpression;
66 class QFontMetricsF;
67 class QPainter;
68 class QPicture;
69 class QgsGeometry;
71 class QgsLabelSearchTree;
72 class QgsMapSettings;
73 class QgsLabelFeature;
74 class QgsLabelingEngine;
77 class QgsDxfExport;
80 class QgsCallout;
81 
86 class CORE_EXPORT QgsLabelPosition
87 {
88  public:
89 
108  QgsLabelPosition( QgsFeatureId id, double r, const QVector< QgsPointXY > &corners, const QgsRectangle &rect, double w, double h, const QString &layer, const QString &labeltext, const QFont &labelfont, bool upside_down, bool diagram = false, bool pinned = false, const QString &providerId = QString(),
109  const QgsGeometry &labelGeometry = QgsGeometry(), bool isUnplaced = false )
110  : featureId( id )
111  , rotation( r )
112  , cornerPoints( corners )
113  , labelRect( rect )
114  , labelGeometry( labelGeometry )
115  , width( w )
116  , height( h )
117  , layerID( layer )
118  , labelText( labeltext )
119  , labelFont( labelfont )
120  , upsideDown( upside_down )
121  , isDiagram( diagram )
122  , isPinned( pinned )
123  , providerID( providerId )
124  , isUnplaced( isUnplaced )
125  {}
126 
128  QgsLabelPosition() = default;
129 
133  QgsFeatureId featureId = FID_NULL;
134 
138  double rotation = 0;
139 
140  QVector< QgsPointXY > cornerPoints;
142 
148 
152  double width = 0;
153 
157  double height = 0;
158 
162  QString layerID;
163 
167  QString labelText;
168 
172  QFont labelFont;
173 
177  bool upsideDown = false;
178 
182  bool isDiagram = false;
183 
187  bool isPinned = false;
188 
193  QString providerID;
194 
199  bool isUnplaced = false;
200 };
201 
206 class CORE_EXPORT QgsPalLayerSettings
207 {
208  public:
212 
214  QgsPalLayerSettings &operator=( const QgsPalLayerSettings &s );
215 
216  //TODO QGIS 4.0 - move to QgsLabelingEngine
217 
222  {
232  };
233 
234  //TODO QGIS 4.0 - move to QgsLabelingEngine
237  {
250  };
251 
252  //TODO QGIS 4.0 - move to QgsLabelingEngine
253 
259  {
262  };
263 
264  //TODO QGIS 4.0 - remove, replaced by QgsLabeling::LinePlacementFlags
265 
271  enum Q_DECL_DEPRECATED LinePlacementFlags
272  {
273  OnLine = 1,
274  AboveLine = 2,
277  BelowLine = 4,
283  };
284 
286  {
296  };
297 
299  {
302  ShowAll
303  };
304 
305  //TODO QGIS 4.0 - Remove -- moved to QgsLabelEngineObstacleSettings
306 
308  enum Q_DECL_DEPRECATED DirectionSymbols
309  {
312  SymbolBelow
313  };
314 
316  {
317  MultiLeft = 0,
320  MultiFollowPlacement,
323  };
324 
325  //TODO QGIS 4.0 - Remove -- moved to QgsLabelEngineObstacleSettings
326 
332  {
333  PolygonInterior,
335  PolygonBoundary,
337  PolygonWhole
341  };
342 
344  enum Property
345  {
346  // text style
347  Size = 0,
348  Bold = 1,
349  Italic = 2,
350  Underline = 3,
351  Color = 4,
352  Strikeout = 5,
353  Family = 6,
354  FontStyle = 21,
355  FontSizeUnit = 22,
356  FontTransp = 18,
357  FontOpacity = 92,
358  FontCase = 27,
359  FontLetterSpacing = 28,
360  FontWordSpacing = 29,
361  FontBlendMode = 30,
362 
363  // text formatting
364  MultiLineWrapChar = 31,
365  AutoWrapLength = 101,
366  MultiLineHeight = 32,
367  MultiLineAlignment = 33,
368  TextOrientation = 110,
369  DirSymbDraw = 34,
370  DirSymbLeft = 35,
371  DirSymbRight = 36,
372  DirSymbPlacement = 37,
373  DirSymbReverse = 38,
374  NumFormat = 39,
375  NumDecimals = 40,
376  NumPlusSign = 41,
377 
378  // text buffer
379  BufferDraw = 42,
380  BufferSize = 7,
381  BufferUnit = 43,
382  BufferColor = 8,
383  BufferTransp = 19,
384  BufferOpacity = 94,
385  BufferJoinStyle = 44,
386  BufferBlendMode = 45,
387 
388  // mask buffer
389  MaskEnabled = 104,
390  MaskBufferSize = 105,
391  MaskBufferUnit = 106,
392  MaskOpacity = 107,
393  MaskJoinStyle = 108,
394 
395  // background
396  ShapeDraw = 46,
397  ShapeKind = 47,
398  ShapeSVGFile = 48,
399  ShapeSizeType = 49,
400  ShapeSizeX = 50,
401  ShapeSizeY = 85,
402  ShapeSizeUnits = 51,
403  ShapeRotationType = 52,
404  ShapeRotation = 53,
405  ShapeOffset = 54,
406  ShapeOffsetUnits = 55,
407  ShapeRadii = 56,
408  ShapeRadiiUnits = 57,
409  ShapeTransparency = 63,
410  ShapeOpacity = 93,
411  ShapeBlendMode = 64,
412  ShapeFillColor = 58,
413  ShapeStrokeColor = 59,
414  ShapeStrokeWidth = 60,
415  ShapeStrokeWidthUnits = 61,
416  ShapeJoinStyle = 62,
417 
418  // drop shadow
419  ShadowDraw = 65,
420  ShadowUnder = 66,
421  ShadowOffsetAngle = 67,
422  ShadowOffsetDist = 68,
423  ShadowOffsetUnits = 69,
424  ShadowRadius = 70,
425  ShadowRadiusUnits = 71,
426  ShadowTransparency = 72,
427  ShadowOpacity = 95,
428  ShadowScale = 73,
429  ShadowColor = 74,
430  ShadowBlendMode = 75,
431 
432  // placement
433  CentroidWhole = 76,
434  OffsetQuad = 77,
435  OffsetXY = 78,
436  OffsetUnits = 80,
437  LabelDistance = 13,
438  DistanceUnits = 81,
439  OffsetRotation = 82,
440  CurvedCharAngleInOut = 83,
441  // (data defined only)
442  PositionX = 9,
443  PositionY = 10,
444  Hali = 11,
445  Vali = 12,
446  Rotation = 14,
447  LabelRotation = 96,
448  RepeatDistance = 84,
449  RepeatDistanceUnit = 86,
450  Priority = 87,
451  PredefinedPositionOrder = 91,
452  LinePlacementOptions = 99,
453  OverrunDistance = 102,
454  LabelAllParts = 103,
455  PolygonLabelOutside = 109,
456  LineAnchorPercent = 111,
457 
458  // rendering
459  ScaleVisibility = 23,
460  MinScale = 16,
461  MinimumScale = 97,
462  MaxScale = 17,
463  MaximumScale = 98,
464  FontLimitPixel = 24,
465  FontMinPixel = 25,
466  FontMaxPixel = 26,
467  IsObstacle = 88,
468  ObstacleFactor = 89,
469  ZIndex = 90,
470  CalloutDraw = 100,
471 
472  // (data defined only)
473  Show = 15,
474  AlwaysShow = 20
475  };
476 
477 
489  bool prepare( QgsRenderContext &context, QSet<QString> &attributeNames SIP_INOUT, const QgsFields &fields, const QgsMapSettings &mapSettings, const QgsCoordinateReferenceSystem &crs );
490 
495  QSet<QString> referencedFields( const QgsRenderContext &context ) const;
496 
505  void startRender( QgsRenderContext &context );
506 
514  void stopRender( QgsRenderContext &context );
515 
520  static const QgsPropertiesDefinition &propertyDefinitions();
521 
530  bool drawLabels = true;
531 
532  //-- text style
533 
539  QString fieldName;
540 
545  bool isExpression = false;
546 
550  QgsExpression *getLabelExpression();
551 
555  Q_DECL_DEPRECATED QColor previewBkgrdColor = Qt::white;
556 
560  bool useSubstitutions = false;
561 
562  //-- text formatting
563 
568  QString wrapChar;
569 
577  int autoWrapLength = 0;
578 
589  bool useMaxLineLengthForAutoWrap = true;
590 
592  MultiLineAlign multilineAlign = MultiFollowPlacement;
593 
600  bool formatNumbers = false;
601 
607  int decimals = 3;
608 
614  bool plusSign = false;
615 
616  //-- placement
617 
618  Placement placement = AroundPoint;
619 
626  QgsLabeling::PolygonPlacementFlags polygonPlacementFlags() const { return mPolygonPlacementFlags; }
627 
634  void setPolygonPlacementFlags( QgsLabeling::PolygonPlacementFlags flags ) { mPolygonPlacementFlags = flags; }
635 
640  bool centroidWhole = false;
641 
647  bool centroidInside = false;
648 
655  QVector< PredefinedPointPosition > predefinedPositionOrder SIP_SKIP;
656 
660  bool fitInPolygonOnly = false;
661 
667  double dist = 0;
668 
675 
682 
684  OffsetType offsetType = FromPoint;
685 
691  double repeatDistance = 0;
692 
699 
706 
710  QuadrantPosition quadOffset = QuadrantOver;
711 
718  double xOffset = 0;
719 
726  double yOffset = 0;
727 
735 
743 
745  double angleOffset = 0;
746 
748  bool preserveRotation = true;
749 
754  double maxCurvedCharAngleIn = 25.0;
755 
760  double maxCurvedCharAngleOut = -25.0;
761 
766  int priority = 5;
767 
768  //-- rendering
769 
775  bool scaleVisibility = false;
776 
787  double maximumScale = 0;
788 
799  double minimumScale = 0;
800 
806  bool fontLimitPixelSize = false;
807 
813  int fontMinPixelSize = 0;
814 
820  int fontMaxPixelSize = 10000;
821 
823  bool displayAll = false;
824 
826  UpsideDownLabels upsidedownLabels = Upright;
827 
832  bool labelPerPart = false;
833 
834  // TODO QGIS 4.0 - remove this junk
835 
836 #ifdef SIP_RUN
837  SIP_PROPERTY( name = limitNumLabels, get = _limitNumLabels, set = _setLimitNumLabels )
838  SIP_PROPERTY( name = maxNumLabels, get = _maxNumLabels, set = _setMaxNumLabels )
839  SIP_PROPERTY( name = minFeatureSize, get = _minFeatureSize, set = _setMinFeatureSize )
840  SIP_PROPERTY( name = obstacle, get = _getIsObstacle, set = _setIsObstacle )
841  SIP_PROPERTY( name = obstacleFactor, get = _getObstacleFactor, set = _setObstacleFactor )
842  SIP_PROPERTY( name = obstacleType, get = _getObstacleType, set = _setObstacleType )
843  SIP_PROPERTY( name = placementFlags, get = _getLinePlacementFlags, set = _setLinePlacementFlags )
844  SIP_PROPERTY( name = mergeLines, get = _getMergeLines, set = _setMergeLines )
845  SIP_PROPERTY( name = addDirectionSymbol, get = _getAddDirectionSymbol, set = _setAddDirectionSymbol )
846  SIP_PROPERTY( name = leftDirectionSymbol, get = _getLeftDirectionSymbol, set = _setLeftDirectionSymbol )
847  SIP_PROPERTY( name = rightDirectionSymbol, get = _getRightDirectionSymbol, set = _setRightDirectionSymbol )
848  SIP_PROPERTY( name = reverseDirectionSymbol, get = _getReverseDirectionSymbol, set = _setReverseDirectionSymbol )
849  SIP_PROPERTY( name = placeDirectionSymbol, get = _getPlaceDirectionSymbol, set = _setPlaceDirectionSymbol )
850 
851  SIP_PROPERTY( name = overrunDistance, get = _getOverrunDistance, set = _setOverrunDistance )
852  SIP_PROPERTY( name = overrunDistanceUnit, get = _getOverrunDistanceUnit, set = _setOverrunDistanceUnit )
853  SIP_PROPERTY( name = overrunDistanceMapUnitScale, get = _getOverrunDistanceMapUnitScale, set = _setOverrunDistanceMapUnitScale )
854 #endif
855 
857  bool _limitNumLabels() const { return mThinningSettings.limitNumberOfLabelsEnabled(); }
858  void _setLimitNumLabels( bool limit ) { mThinningSettings.setLimitNumberLabelsEnabled( limit ); }
859  int _maxNumLabels() const { return mThinningSettings.maximumNumberLabels(); }
860  void _setMaxNumLabels( int max ) { mThinningSettings.setMaximumNumberLabels( max ); }
861  double _minFeatureSize() const { return mThinningSettings.minimumFeatureSize(); }
862  void _setMinFeatureSize( double size ) { mThinningSettings.setMinimumFeatureSize( size ); }
863  bool _getIsObstacle() const { return mObstacleSettings.isObstacle(); }
864  void _setIsObstacle( bool obstacle ) { mObstacleSettings.setIsObstacle( obstacle ); }
865  double _getObstacleFactor() const { return mObstacleSettings.factor(); }
866  void _setObstacleFactor( double factor ) { mObstacleSettings.setFactor( factor ); }
867  ObstacleType _getObstacleType() const { return static_cast< ObstacleType>( mObstacleSettings.type() ); }
868  void _setObstacleType( ObstacleType type ) { mObstacleSettings.setType( static_cast< QgsLabelObstacleSettings::ObstacleType>( type ) ); }
869  unsigned int _getLinePlacementFlags() const { return static_cast< unsigned int >( mLineSettings.placementFlags() ); }
870  void _setLinePlacementFlags( unsigned int flags ) { mLineSettings.setPlacementFlags( static_cast< QgsLabeling::LinePlacementFlags >( flags ) ); }
871  bool _getMergeLines() const { return mLineSettings.mergeLines(); }
872  void _setMergeLines( bool merge ) { mLineSettings.setMergeLines( merge ); }
873  bool _getAddDirectionSymbol() const { return mLineSettings.addDirectionSymbol(); }
874  void _setAddDirectionSymbol( bool add ) { mLineSettings.setAddDirectionSymbol( add ); }
875  QString _getLeftDirectionSymbol() const { return mLineSettings.leftDirectionSymbol(); }
876  void _setLeftDirectionSymbol( const QString &symbol ) { mLineSettings.setLeftDirectionSymbol( symbol ); }
877  QString _getRightDirectionSymbol() const { return mLineSettings.rightDirectionSymbol(); }
878  void _setRightDirectionSymbol( const QString &symbol ) { mLineSettings.setRightDirectionSymbol( symbol ); }
879  bool _getReverseDirectionSymbol() const { return mLineSettings.reverseDirectionSymbol(); }
880  void _setReverseDirectionSymbol( bool reverse ) { mLineSettings.setReverseDirectionSymbol( reverse ); }
882  DirectionSymbols _getPlaceDirectionSymbol() const { return static_cast< DirectionSymbols>( mLineSettings.directionSymbolPlacement() ); }
883  void _setPlaceDirectionSymbol( DirectionSymbols placement ) { mLineSettings.setDirectionSymbolPlacement( static_cast< QgsLabelLineSettings::DirectionSymbolPlacement>( placement ) ); }
885  double _getOverrunDistance() const { return mLineSettings.overrunDistance(); }
886  void _setOverrunDistance( double distance ) { mLineSettings.setOverrunDistance( distance ); }
887  QgsUnitTypes::RenderUnit _getOverrunDistanceUnit() const { return mLineSettings.overrunDistanceUnit(); }
888  void _setOverrunDistanceUnit( QgsUnitTypes::RenderUnit unit ) { mLineSettings.setOverrunDistanceUnit( unit ); }
889  QgsMapUnitScale _getOverrunDistanceMapUnitScale() const { return mLineSettings.overrunDistanceMapUnitScale(); }
890  void _setOverrunDistanceMapUnitScale( const QgsMapUnitScale &scale ) { mLineSettings.setOverrunDistanceMapUnitScale( scale ); }
892 
894  double zIndex = 0;
895 
898 
900  QgsWkbTypes::GeometryType geometryGeneratorType = QgsWkbTypes::GeometryType::PointGeometry;
901 
903  bool geometryGeneratorEnabled = false;
904 
910 
917 #ifndef SIP_RUN
918  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,
919  QgsTextDocument *document = nullptr );
920 #else
921  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 );
922 #endif
923 
938  void registerFeature( const QgsFeature &f, QgsRenderContext &context,
939  QgsLabelFeature **labelFeature SIP_PYARGREMOVE = nullptr,
940  QgsGeometry obstacleGeometry SIP_PYARGREMOVE = QgsGeometry(), const QgsSymbol *symbol SIP_PYARGREMOVE = nullptr );
941 
946  void readXml( const QDomElement &elem, const QgsReadWriteContext &context );
947 
952  QDomElement writeXml( QDomDocument &doc, const QgsReadWriteContext &context ) const;
953 
959  QgsPropertyCollection &dataDefinedProperties() { return mDataDefinedProperties; }
960 
968  const QgsPropertyCollection &dataDefinedProperties() const SIP_SKIP { return mDataDefinedProperties; }
969 
977  void setDataDefinedProperties( const QgsPropertyCollection &collection ) { mDataDefinedProperties = collection; }
978 
984  const QgsTextFormat &format() const { return mFormat; }
985 
992  void setFormat( const QgsTextFormat &format ) { mFormat = format; }
993 
1002  QgsCallout *callout() const { return mCallout.get(); }
1003 
1012  void setCallout( QgsCallout *callout SIP_TRANSFER );
1013 
1022  const QgsLabelLineSettings &lineSettings() const { return mLineSettings; } SIP_SKIP
1023 
1031  QgsLabelLineSettings &lineSettings() { return mLineSettings; }
1032 
1040  void setLineSettings( const QgsLabelLineSettings &settings ) { mLineSettings = settings; }
1041 
1048  const QgsLabelObstacleSettings &obstacleSettings() const { return mObstacleSettings; } SIP_SKIP
1049 
1055  QgsLabelObstacleSettings &obstacleSettings() { return mObstacleSettings; }
1056 
1062  void setObstacleSettings( const QgsLabelObstacleSettings &settings ) { mObstacleSettings = settings; }
1063 
1070  const QgsLabelThinningSettings &thinningSettings() const { return mThinningSettings; } SIP_SKIP
1071 
1077  QgsLabelThinningSettings &thinningSettings() { return mThinningSettings; }
1078 
1084  void setThinningSettings( const QgsLabelThinningSettings &settings ) { mThinningSettings = settings; }
1085 
1094  static QPixmap labelSettingsPreviewPixmap( const QgsPalLayerSettings &settings, QSize size, const QString &previewText = QString(), int padding = 0 );
1095 
1096  // temporary stuff: set when layer gets prepared or labeled
1097  const QgsFeature *mCurFeat = nullptr;
1099  int fieldIndex = 0;
1100  const QgsMapToPixel *xform = nullptr;
1102 
1106  int mFeaturesToLabel = 0; // total features that will probably be labeled, may be less (figured before PAL)
1107  int mFeatsSendingToPal = 0; // total features tested for sending into PAL (relative to maxNumLabels)
1108  int mFeatsRegPal = 0; // number of features registered in PAL, when using limitNumLabels
1109  private:
1110 
1111  friend class QgsVectorLayer; // to allow calling readFromLayerCustomProperties()
1112 
1117  void readFromLayerCustomProperties( QgsVectorLayer *layer );
1118 
1122  void readOldDataDefinedPropertyMap( QgsVectorLayer *layer, QDomElement *parentElem );
1123 
1127  void readOldDataDefinedProperty( QgsVectorLayer *layer, QgsPalLayerSettings::Property p );
1128 
1129  enum DataDefinedValueType
1130  {
1131  DDBool,
1132  DDInt,
1133  DDIntPos,
1134  DDDouble,
1135  DDDoublePos,
1136  DDRotation180,
1137  DDOpacity,
1138  DDString,
1139  DDUnits,
1140  DDColor,
1141  DDJoinStyle,
1142  DDBlendMode,
1143  DDPointF,
1144  DDSizeF,
1145  };
1146 
1147  // convenience data defined evaluation function
1148  bool dataDefinedValEval( DataDefinedValueType valType,
1150  QVariant &exprVal, QgsExpressionContext &context, const QVariant &originalValue = QVariant() );
1151 
1152  void parseTextStyle( QFont &labelFont,
1153  QgsUnitTypes::RenderUnit fontunits,
1154  QgsRenderContext &context );
1155 
1156  void parseTextBuffer( QgsRenderContext &context );
1157 
1158  void parseTextMask( QgsRenderContext &context );
1159 
1160  void parseTextFormatting( QgsRenderContext &context );
1161 
1162  void parseShapeBackground( QgsRenderContext &context );
1163 
1164  void parseDropShadow( QgsRenderContext &context );
1165 
1170  bool checkMinimumSizeMM( const QgsRenderContext &ct, const QgsGeometry &geom, double minSize ) const;
1171 
1175  void registerObstacleFeature( const QgsFeature &f, QgsRenderContext &context, QgsLabelFeature **obstacleFeature, const QgsGeometry &obstacleGeometry = QgsGeometry() );
1176 
1177  QMap<Property, QVariant> dataDefinedValues;
1178 
1180  QgsPropertyCollection mDataDefinedProperties;
1181 
1182  QgsExpression *expression = nullptr;
1183 
1184  QFontDatabase mFontDB;
1185 
1186  QgsTextFormat mFormat;
1187 
1188  std::unique_ptr< QgsCallout > mCallout;
1189 
1190  QgsLabelLineSettings mLineSettings;
1191  QgsLabelObstacleSettings mObstacleSettings;
1192  QgsLabelThinningSettings mThinningSettings;
1193 
1194  QgsLabeling::PolygonPlacementFlags mPolygonPlacementFlags = QgsLabeling::PolygonPlacementFlag::AllowPlacementInsideOfPolygon;
1195 
1196  QgsExpression mGeometryGeneratorExpression;
1197 
1198  bool mRenderStarted = false;
1199 
1200  static void initPropertyDefinitions();
1201 };
1202 
1206 class CORE_EXPORT QgsLabelCandidate
1207 {
1208  public:
1209  QgsLabelCandidate( const QRectF &r, double c ): rect( r ), cost( c ) {}
1210 
1211  QRectF rect;
1212  double cost;
1213 };
1214 
1215 
1216 
1217 
1223 class CORE_EXPORT QgsLabelingResults
1224 {
1225  public:
1228 
1233 
1235  QList<QgsLabelPosition> labelsAtPosition( const QgsPointXY &p ) const;
1237  QList<QgsLabelPosition> labelsWithinRect( const QgsRectangle &r ) const;
1238 
1243  void setMapSettings( const QgsMapSettings &settings );
1244 
1245  private:
1246 #ifdef SIP_RUN
1248 #endif
1249 
1250  std::unique_ptr< QgsLabelSearchTree > mLabelSearchTree;
1251 
1252  friend class QgsPalLabeling;
1255 };
1256 
1261 class CORE_EXPORT QgsPalLabeling
1262 {
1263  public:
1264 
1269  static bool staticWillUseLayer( const QgsMapLayer *layer );
1270 
1272  static void drawLabelCandidateRect( pal::LabelPosition *lp, QPainter *painter, const QgsMapToPixel *xform, QList<QgsLabelCandidate> *candidates = nullptr ) SIP_SKIP;
1273 
1284  static QgsGeometry prepareGeometry( const QgsGeometry &geometry, QgsRenderContext &context, const QgsCoordinateTransform &ct, const QgsGeometry &clipGeometry = QgsGeometry(), bool mergeLines = false ) SIP_FACTORY;
1285 
1296  static bool geometryRequiresPreparation( const QgsGeometry &geometry, QgsRenderContext &context, const QgsCoordinateTransform &ct, const QgsGeometry &clipGeometry = QgsGeometry(), bool mergeLines = false );
1297 
1310  static QStringList splitToLines( const QString &text, const QString &wrapCharacter, int autoWrapLength = 0, bool useMaxLineLengthWhenAutoWrapping = true );
1311 
1320  static QStringList splitToGraphemes( const QString &text );
1321 
1322  private:
1324  static void dataDefinedTextStyle( QgsPalLayerSettings &tmpLyr,
1325  const QMap< QgsPalLayerSettings::Property, QVariant > &ddValues );
1326 
1328  static void dataDefinedTextFormatting( QgsPalLayerSettings &tmpLyr,
1329  const QMap< QgsPalLayerSettings::Property, QVariant > &ddValues );
1330 
1332  static void dataDefinedTextBuffer( QgsPalLayerSettings &tmpLyr,
1333  const QMap< QgsPalLayerSettings::Property, QVariant > &ddValues );
1334 
1336  static void dataDefinedTextMask( QgsPalLayerSettings &tmpLyr,
1337  const QMap< QgsPalLayerSettings::Property, QVariant > &ddValues );
1338 
1340  static void dataDefinedShapeBackground( QgsPalLayerSettings &tmpLyr,
1341  const QMap< QgsPalLayerSettings::Property, QVariant > &ddValues );
1342 
1344  static void dataDefinedDropShadow( QgsPalLayerSettings &tmpLyr,
1345  const QMap< QgsPalLayerSettings::Property, QVariant > &ddValues );
1346 
1347  friend class QgsVectorLayerLabelProvider; // to allow calling the static methods above
1348  friend class QgsDxfExport; // to allow calling the static methods above
1349 
1358  static bool checkMinimumSizeMM( const QgsRenderContext &context, const QgsGeometry &geom, double minSize );
1359 
1360  friend class QgsPalLayerSettings;
1361 };
1362 
1363 
1364 #endif // QGSPALLABELING_H
QgsExpressionContext
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Definition: qgsexpressioncontext.h:370
qgsfields.h
QgsPalLayerSettings::ct
QgsCoordinateTransform ct
Definition: qgspallabeling.h:1101
QgsPalLayerSettings::PerimeterCurved
@ PerimeterCurved
Arranges candidates following the curvature of a polygon's boundary. Applies to polygon layers only.
Definition: qgspallabeling.h:230
QgsUnitTypes::RenderUnit
RenderUnit
Rendering size units.
Definition: qgsunittypes.h:167
QgsDxfExport
Definition: qgsdxfexport.h:63
QgsPalLayerSettings::AroundPoint
@ AroundPoint
Arranges candidates in a circle around a point (or centroid of a polygon). Applies to point or polygo...
Definition: qgspallabeling.h:223
QgsLabelCandidate::QgsLabelCandidate
QgsLabelCandidate(const QRectF &r, double c)
Definition: qgspallabeling.h:1209
QgsReadWriteContext
The class is used as a container of context for various read/write operations on other objects.
Definition: qgsreadwritecontext.h:35
QgsPalLayerSettings::FromSymbolBounds
@ FromSymbolBounds
Offset distance applies from rendered symbol bounds.
Definition: qgspallabeling.h:261
QgsPalLayerSettings::lineSettings
QgsLabelLineSettings & lineSettings()
Returns the label line settings, which contain settings related to how the label engine places and fo...
Definition: qgspallabeling.h:1031
QgsCallout
Abstract base class for callout renderers.
Definition: qgscallout.h:47
QgsPalLayerSettings::setPolygonPlacementFlags
void setPolygonPlacementFlags(QgsLabeling::PolygonPlacementFlags flags)
Sets the polygon placement flags, which dictate how polygon labels can be placed.
Definition: qgspallabeling.h:634
SymbolLeftRight
SymbolLeftRight
Place direction symbols on left/right of label.
Definition: qgspallabeling.h:310
QgsPalLayerSettings
Definition: qgspallabeling.h:207
QgsLabelingResults::QgsLabelingResults
QgsLabelingResults(const QgsLabelingResults &)=delete
QgsLabelingResults cannot be copied.
qgslabelingenginesettings.h
SIP_OUT
#define SIP_OUT
Definition: qgis_sip.h:58
qgsstringutils.h
crs
const QgsCoordinateReferenceSystem & crs
Definition: qgswfsgetfeature.cpp:51
qgslabelthinningsettings.h
pal::LabelPosition
LabelPosition is a candidate feature label position.
Definition: labelposition.h:56
QgsPalLayerSettings::obstacleSettings
QgsLabelObstacleSettings & obstacleSettings()
Returns the label obstacle settings.
Definition: qgspallabeling.h:1055
MapOrientation
MapOrientation
Signifies that the AboveLine and BelowLine flags should respect the map's orientation rather than the...
Definition: qgspallabeling.h:280
QgsVectorLayerDiagramProvider
The QgsVectorLayerDiagramProvider class implements support for diagrams within the labeling engine.
Definition: qgsvectorlayerdiagramprovider.h:63
QgsPalLayerSettings::FromPoint
@ FromPoint
Offset distance applies from point geometry.
Definition: qgspallabeling.h:260
QgsFields
Container of fields for a vector layer.
Definition: qgsfields.h:45
AboveLine
AboveLine
Labels can be placed above a line feature.
Definition: qgspallabeling.h:274
qgslabellinesettings.h
QgsPalLayerSettings::thinningSettings
const QgsLabelThinningSettings & thinningSettings() const
Returns the label thinning settings.
Definition: qgspallabeling.h:1070
QgsPalLayerSettings::obstacleSettings
const QgsLabelObstacleSettings & obstacleSettings() const
Returns the label obstacle settings.
Definition: qgspallabeling.h:1048
qgsfeature.h
QgsLabelingResults
Class that stores computed placement from labeling engine.
Definition: qgspallabeling.h:1224
QgsPalLayerSettings::MiddleRight
@ MiddleRight
Label on right of point.
Definition: qgspallabeling.h:244
QgsPalLayerSettings::TopRight
@ TopRight
Label on top-right of point.
Definition: qgspallabeling.h:242
QgsPalLayerSettings::OffsetType
OffsetType
Behavior modifier for label offset and distance, only applies in some label placement modes.
Definition: qgspallabeling.h:259
QgsPalLayerSettings::QuadrantPosition
QuadrantPosition
Definition: qgspallabeling.h:286
QgsRenderContext
Contains information about the context of a rendering operation.
Definition: qgsrendercontext.h:58
FID_NULL
#define FID_NULL
Definition: qgsfeatureid.h:29
QgsUnitTypes::RenderMillimeters
@ RenderMillimeters
Millimeters.
Definition: qgsunittypes.h:168
QgsLabelPosition::labelFont
QFont labelFont
Font which the label is rendered using.
Definition: qgspallabeling.h:172
QgsPalLayerSettings::MultiLineAlign
MultiLineAlign
Definition: qgspallabeling.h:316
QgsPalLayerSettings::substitutions
QgsStringReplacementCollection substitutions
Substitution collection for automatic text substitution with labels.
Definition: qgspallabeling.h:558
SIP_PYARGREMOVE
#define SIP_PYARGREMOVE
Definition: qgis_sip.h:146
QgsLabelObstacleSettings
Contains settings related to how the label engine treats features as obstacles.
Definition: qgslabelobstaclesettings.h:35
QgsSymbol
Abstract base class for all rendered symbols.
Definition: qgssymbol.h:64
QgsPalLayerSettings::Line
@ Line
Arranges candidates parallel to a generalised line representing the feature or parallel to a polygon'...
Definition: qgspallabeling.h:225
QgsTextLabelFeature
Class that adds extra information to QgsLabelFeature for text labels.
Definition: qgspalgeometry.h:31
QgsPalLayerSettings::TopSlightlyRight
@ TopSlightlyRight
Label on top of point, slightly right of center.
Definition: qgspallabeling.h:241
QgsVectorLayerLabelProvider
The QgsVectorLayerLabelProvider class implements a label provider for vector layers.
Definition: qgsvectorlayerlabelprovider.h:41
QgsRectangle
A rectangle specified with double values.
Definition: qgsrectangle.h:42
QgsPalLayerSettings::OverPoint
@ OverPoint
Arranges candidates over a point (or centroid of a polygon), or at a preset offset from the point....
Definition: qgspallabeling.h:224
QgsLabelPosition::QgsLabelPosition
QgsLabelPosition(QgsFeatureId id, double r, const QVector< QgsPointXY > &corners, const QgsRectangle &rect, double w, double h, const QString &layer, const QString &labeltext, const QFont &labelfont, bool upside_down, bool diagram=false, bool pinned=false, const QString &providerId=QString(), const QgsGeometry &labelGeometry=QgsGeometry(), bool isUnplaced=false)
Constructor for QgsLabelPosition.
Definition: qgspallabeling.h:108
QgsPalLayerSettings::ObstacleType
ObstacleType
Valid obstacle types, which affect how features within the layer will act as obstacles for labels.
Definition: qgspallabeling.h:332
QgsLabelCandidate
Definition: qgspallabeling.h:1207
pal
Definition: qgsdiagramrenderer.h:49
QgsLabelPosition
Definition: qgspallabeling.h:87
QgsPalLayerSettings::QuadrantAboveRight
@ QuadrantAboveRight
Definition: qgspallabeling.h:289
QgsPalLayerSettings::TopMiddle
@ TopMiddle
Label directly above point.
Definition: qgspallabeling.h:240
QgsPalLayerSettings::setThinningSettings
void setThinningSettings(const QgsLabelThinningSettings &settings)
Sets the label thinning settings.
Definition: qgspallabeling.h:1084
SIP_FACTORY
#define SIP_FACTORY
Definition: qgis_sip.h:76
QgsLabelPosition::providerID
QString providerID
ID of the associated label provider.
Definition: qgspallabeling.h:193
QgsPalLayerSettings::QuadrantBelowLeft
@ QuadrantBelowLeft
Definition: qgspallabeling.h:293
QgsPalLayerSettings::BottomMiddle
@ BottomMiddle
Label directly below point.
Definition: qgspallabeling.h:247
Q_NOWARN_DEPRECATED_POP
#define Q_NOWARN_DEPRECATED_POP
Definition: qgis.h:797
QgsPalLayerSettings::OrderedPositionsAroundPoint
@ OrderedPositionsAroundPoint
Candidates are placed in predefined positions around a point. Preference is given to positions with g...
Definition: qgspallabeling.h:229
QgsTextFormat
Container for all settings relating to text rendering.
Definition: qgstextformat.h:40
QgsPropertiesDefinition
QMap< int, QgsPropertyDefinition > QgsPropertiesDefinition
Definition of available properties.
Definition: qgspropertycollection.h:29
QgsPalLayerSettings::Placement
Placement
Placement modes which determine how label candidates are generated for a feature.
Definition: qgspallabeling.h:222
QgsPalLayerSettings::Curved
@ Curved
Arranges candidates following the curvature of a line feature. Applies to line layers only.
Definition: qgspallabeling.h:226
SIP_SKIP
#define SIP_SKIP
Definition: qgis_sip.h:126
QgsPalLayerSettings::QuadrantLeft
@ QuadrantLeft
Definition: qgspallabeling.h:290
QgsPalLayerSettings::setDataDefinedProperties
void setDataDefinedProperties(const QgsPropertyCollection &collection)
Sets the label's property collection, used for data defined overrides.
Definition: qgspallabeling.h:977
QgsPalLayerSettings::wrapChar
QString wrapChar
Wrapping character string.
Definition: qgspallabeling.h:568
QgsLabelPosition::labelRect
QgsRectangle labelRect
Definition: qgspallabeling.h:141
QgsPalLayerSettings::TopSlightlyLeft
@ TopSlightlyLeft
Label on top of point, slightly left of center.
Definition: qgspallabeling.h:239
QgsPalLayerSettings::BottomSlightlyLeft
@ BottomSlightlyLeft
Label below point, slightly left of center.
Definition: qgspallabeling.h:246
QgsPalLayerSettings::format
const QgsTextFormat & format() const
Returns the label text formatting settings, e.g., font settings, buffer settings, etc.
Definition: qgspallabeling.h:984
QgsLabelCandidate::rect
QRectF rect
Definition: qgspallabeling.h:1211
QgsLabelingResults::operator=
QgsLabelingResults & operator=(const QgsLabelingResults &rh)=delete
QgsLabelingResults cannot be copied.
qgis_sip.h
QgsPalLayerSettings::setFormat
void setFormat(const QgsTextFormat &format)
Sets the label text formatting settings, e.g., font settings, buffer settings, etc.
Definition: qgspallabeling.h:992
QgsPalLayerSettings::repeatDistanceMapUnitScale
QgsMapUnitScale repeatDistanceMapUnitScale
Map unit scale for repeating labels for a single feature.
Definition: qgspallabeling.h:705
SIP_TRANSFER
#define SIP_TRANSFER
Definition: qgis_sip.h:36
QgsPalLayerSettings::thinningSettings
QgsLabelThinningSettings & thinningSettings()
Returns the label thinning settings.
Definition: qgspallabeling.h:1077
QgsDiagramLayerSettings
Stores the settings for rendering of all diagrams for a layer.
Definition: qgsdiagramrenderer.h:61
QgsPalLayerSettings::Upright
@ Upright
Upside-down labels (90 <= angle < 270) are shown upright.
Definition: qgspallabeling.h:300
QgsPalLayerSettings::MiddleLeft
@ MiddleLeft
Label on left of point.
Definition: qgspallabeling.h:243
QgsPalLabeling
Definition: qgspallabeling.h:1262
QgsPalLayerSettings::PredefinedPointPosition
PredefinedPointPosition
Positions for labels when using the QgsPalLabeling::OrderedPositionsAroundPoint placement mode.
Definition: qgspallabeling.h:237
QgsPalLayerSettings::lineSettings
const QgsLabelLineSettings & lineSettings() const
Returns the label line settings, which contain settings related to how the label engine places and fo...
Definition: qgspallabeling.h:1022
QgsPalLayerSettings::ShowDefined
@ ShowDefined
Show upside down when rotation is layer- or data-defined.
Definition: qgspallabeling.h:301
QgsMapUnitScale
Struct for storing maximum and minimum scales for measurements in map units.
Definition: qgsmapunitscale.h:38
QgsLabelPosition::labelText
QString labelText
String shown in label.
Definition: qgspallabeling.h:167
QgsPalLayerSettings::dataDefinedProperties
const QgsPropertyCollection & dataDefinedProperties() const
Returns a reference to the label's property collection, used for data defined overrides.
Definition: qgspallabeling.h:968
QgsPalLayerSettings::UpsideDownLabels
UpsideDownLabels
Definition: qgspallabeling.h:299
QgsLabelThinningSettings
Contains settings related to how the label engine removes candidate label positions and reduces the n...
Definition: qgslabelthinningsettings.h:35
QgsPalLayerSettings::ptOne
QgsPointXY ptOne
Definition: qgspallabeling.h:1104
QgsStringReplacementCollection
A collection of string replacements (specified using QgsStringReplacement objects).
Definition: qgsstringutils.h:116
QgsLabelPosition::layerID
QString layerID
ID of associated map layer.
Definition: qgspallabeling.h:162
QgsCoordinateReferenceSystem
This class represents a coordinate reference system (CRS).
Definition: qgscoordinatereferencesystem.h:206
QgsPalLayerSettings::BottomSlightlyRight
@ BottomSlightlyRight
Label below point, slightly right of center.
Definition: qgspallabeling.h:248
QgsPalLayerSettings::Horizontal
@ Horizontal
Arranges horizontal candidates scattered throughout a polygon feature. Applies to polygon layers only...
Definition: qgspallabeling.h:227
SIP_INOUT
#define SIP_INOUT
Definition: qgis_sip.h:71
QgsLabelingEngine
The QgsLabelingEngine class provides map labeling functionality.
Definition: qgslabelingengine.h:215
OnLine
OnLine
Labels can be placed directly over a line feature.
Definition: qgspallabeling.h:273
QgsPointXY
A class to represent a 2D point.
Definition: qgspointxy.h:44
QgsPalLayerSettings::QuadrantBelowRight
@ QuadrantBelowRight
Definition: qgspallabeling.h:295
QgsPalLayerSettings::QuadrantBelow
@ QuadrantBelow
Definition: qgspallabeling.h:294
QgsLabelingResults::~QgsLabelingResults
~QgsLabelingResults()
QgsPropertyCollection
A grouped map of multiple QgsProperty objects, each referenced by a integer key value.
Definition: qgspropertycollection.h:319
qgslabeling.h
QgsPalLayerSettings::TopLeft
@ TopLeft
Label on top-left of point.
Definition: qgspallabeling.h:238
QgsLabelLineSettings
Contains settings related to how the label engine places and formats labels for line features (or pol...
Definition: qgslabellinesettings.h:40
QgsPalLayerSettings::fieldName
QString fieldName
Name of field (or an expression) to use for label text.
Definition: qgspallabeling.h:539
qgsgeometry.h
QgsWkbTypes::GeometryType
GeometryType
The geometry types are used to group QgsWkbTypes::Type in a coarse way.
Definition: qgswkbtypes.h:141
c
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
Definition: porting_processing.dox:1
QgsGeometry
A geometry is the spatial representation of a feature.
Definition: qgsgeometry.h:124
QgsMapToPixel
Perform transforms between map coordinates and device coordinates.
Definition: qgsmaptopixel.h:38
QgsPalLayerSettings::geometryGenerator
QString geometryGenerator
The geometry generator expression. Null if disabled.
Definition: qgspallabeling.h:897
QgsVectorLayer
Represents a vector layer which manages a vector based data sets.
Definition: qgsvectorlayer.h:387
QgsMapLayer
Base class for all map layer types.
Definition: qgsmaplayer.h:83
QgsPalLayerSettings::OutsidePolygons
@ OutsidePolygons
Candidates are placed outside of polygon boundaries. Applies to polygon layers only....
Definition: qgspallabeling.h:231
QgsPalLayerSettings::QuadrantRight
@ QuadrantRight
Definition: qgspallabeling.h:292
QgsPalLayerSettings::setLineSettings
void setLineSettings(const QgsLabelLineSettings &settings)
Sets the label line settings, which contain settings related to how the label engine places and forma...
Definition: qgspallabeling.h:1040
QgsTextDocument
Represents a document consisting of one or more QgsTextBlock objects.
Definition: qgstextdocument.h:39
QgsPalLayerSettings::extentGeom
QgsGeometry extentGeom
Definition: qgspallabeling.h:1105
QgsPalLayerSettings::callout
QgsCallout * callout() const
Returns the label callout renderer, responsible for drawing label callouts.
Definition: qgspallabeling.h:1002
QgsWkbTypes::UnknownGeometry
@ UnknownGeometry
Definition: qgswkbtypes.h:145
qgspropertycollection.h
QgsPalLayerSettings::mCurFields
QgsFields mCurFields
Definition: qgspallabeling.h:1098
QgsLabelPosition::QgsLabelPosition
QgsLabelPosition()=default
Constructor for QgsLabelPosition.
QgsPalLayerSettings::QuadrantOver
@ QuadrantOver
Definition: qgspallabeling.h:291
QgsPalLayerSettings::labelOffsetMapUnitScale
QgsMapUnitScale labelOffsetMapUnitScale
Map unit scale for label offset.
Definition: qgspallabeling.h:742
qgsmapunitscale.h
QgsPalLayerSettings::BottomRight
@ BottomRight
Label on bottom right of point.
Definition: qgspallabeling.h:249
QgsPalLayerSettings::ptZero
QgsPointXY ptZero
Definition: qgspallabeling.h:1103
SIP_PROPERTY
#define SIP_PROPERTY(name, getter, setter)
Definition: qgis_sip.h:262
QgsPalLayerSettings::MultiRight
@ MultiRight
Definition: qgspallabeling.h:319
QgsLabelPosition::labelGeometry
QgsGeometry labelGeometry
A polygon geometry representing the label's bounds in map coordinates.
Definition: qgspallabeling.h:147
QgsFeature
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
Definition: qgsfeature.h:56
QgsPalLayerSettings::Property
Property
Data definable properties.
Definition: qgspallabeling.h:345
QgsLabelObstacleSettings::ObstacleType
ObstacleType
Valid obstacle types, which affect how features within the layer will act as obstacles for labels.
Definition: qgslabelobstaclesettings.h:43
QgsLabelSearchTree
A class to query the labeling structure at a given point (small wrapper around pal RTree class)
Definition: qgslabelsearchtree.h:46
QgsLabelFeature
The QgsLabelFeature class describes a feature that should be used within the labeling engine.
Definition: qgslabelfeature.h:57
qgstextformat.h
QgsPalLayerSettings::QuadrantAboveLeft
@ QuadrantAboveLeft
Definition: qgspallabeling.h:287
QgsExpression
Class for parsing and evaluation of expressions (formerly called "search strings").
Definition: qgsexpression.h:105
QgsMapSettings
The QgsMapSettings class contains configuration for rendering of the map.
Definition: qgsmapsettings.h:88
QgsPalLayerSettings::dataDefinedProperties
QgsPropertyCollection & dataDefinedProperties()
Returns a reference to the label's property collection, used for data defined overrides.
Definition: qgspallabeling.h:959
QgsCoordinateTransform
Class for doing transforms between two map coordinate systems.
Definition: qgscoordinatetransform.h:53
QgsLabelCandidate::cost
double cost
Definition: qgspallabeling.h:1212
Q_NOWARN_DEPRECATED_PUSH
#define Q_NOWARN_DEPRECATED_PUSH
Definition: qgis.h:796
QgsPalLayerSettings::Free
@ Free
Arranges candidates scattered throughout a polygon feature. Candidates are rotated to respect the pol...
Definition: qgspallabeling.h:228
qgssymbol.h
QgsPalLayerSettings::MultiJustify
@ MultiJustify
Justified.
Definition: qgspallabeling.h:322
QgsLabelLineSettings::DirectionSymbolPlacement
DirectionSymbolPlacement
Placement options for direction symbols.
Definition: qgslabellinesettings.h:47
QgsPalLayerSettings::polygonPlacementFlags
QgsLabeling::PolygonPlacementFlags polygonPlacementFlags() const
Returns the polygon placement flags, which dictate how polygon labels can be placed.
Definition: qgspallabeling.h:626
BelowLine
BelowLine
Labels can be placed below a line feature.
Definition: qgspallabeling.h:277
QgsLabelPosition::cornerPoints
QVector< QgsPointXY > cornerPoints
Definition: qgspallabeling.h:140
QgsPalLayerSettings::QuadrantAbove
@ QuadrantAbove
Definition: qgspallabeling.h:288
QgsPalLayerSettings::setObstacleSettings
void setObstacleSettings(const QgsLabelObstacleSettings &settings)
Sets the label obstacle settings.
Definition: qgspallabeling.h:1062
qgspointxy.h
QgsPalLayerSettings::MultiCenter
@ MultiCenter
Definition: qgspallabeling.h:318
QgsPalLayerSettings::distMapUnitScale
QgsMapUnitScale distMapUnitScale
Map unit scale for label feature distance.
Definition: qgspallabeling.h:681
QgsPalLayerSettings::BottomLeft
@ BottomLeft
Label on bottom-left of point.
Definition: qgspallabeling.h:245
SymbolAbove
SymbolAbove
Place direction symbols on above label.
Definition: qgspallabeling.h:311
QgsFeatureId
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features
Definition: qgsfeatureid.h:28
qgslabelobstaclesettings.h