QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
qgslabelfeature.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgslabelfeature.h
3  ---------------------
4  begin : December 2015
5  copyright : (C) 2015 by Martin Dobias
6  email : wonder dot sk at gmail dot com
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 #ifndef QGSLABELFEATURE_H
16 #define QGSLABELFEATURE_H
17 
18 #define SIP_NO_FILE
19 
20 #include "qgis_core.h"
21 #include "geos_c.h"
22 #include "qgsgeos.h"
23 #include "qgsmargins.h"
25 #include "qgslabellinesettings.h"
26 #include "qgslabeling.h"
27 #include "qgsfeature.h"
29 
30 namespace pal
31 {
32  class Layer;
33 }
34 
36 class QgsRenderContext;
37 class QgsGeometry;
38 
39 
57 class CORE_EXPORT QgsLabelFeature
58 {
59  public:
60 
62  QgsLabelFeature( QgsFeatureId id, geos::unique_ptr geometry, QSizeF size );
64  virtual ~QgsLabelFeature();
65 
67  QgsFeatureId id() const { return mId; }
68 
70  GEOSGeometry *geometry() const { return mGeometry.get(); }
71 
81  void setPermissibleZone( const QgsGeometry &geometry );
82 
91  QgsGeometry permissibleZone() const { return mPermissibleZone; }
92 
98  //TODO - remove when QgsGeometry caches GEOS preparedness
99  const GEOSPreparedGeometry *permissibleZonePrepared() const { return mPermissibleZoneGeosPrepared.get(); }
100 
102  QSizeF size( double angle = 0.0 ) const;
103 
114  void setVisualMargin( const QgsMargins &margin ) { mVisualMargin = margin; }
115 
120  const QgsMargins &visualMargin() const { return mVisualMargin; }
121 
128  void setSymbolSize( QSizeF size ) { mSymbolSize = size; }
129 
137  const QSizeF &symbolSize() const { return mSymbolSize; }
138 
145  double priority() const { return mPriority; }
146 
154  void setPriority( double priority ) { mPriority = priority; }
155 
162  double zIndex() const { return mZIndex; }
163 
171  void setZIndex( double zIndex ) { mZIndex = zIndex; }
172 
174  bool hasFixedPosition() const { return mHasFixedPosition; }
176  void setHasFixedPosition( bool enabled ) { mHasFixedPosition = enabled; }
178  QgsPointXY fixedPosition() const { return mFixedPosition; }
179 
181  void setFixedPosition( const QgsPointXY &point ) { mFixedPosition = point; }
182 
189  QgsPointXY anchorPosition() const;
190 
197  void setAnchorPosition( const QgsPointXY &anchorPosition );
198 
200  bool hasFixedAngle() const { return mHasFixedAngle; }
202  void setHasFixedAngle( bool enabled ) { mHasFixedAngle = enabled; }
204  double fixedAngle() const { return mFixedAngle; }
206  void setFixedAngle( double angle ) { mFixedAngle = angle; }
207 
214  bool hasFixedQuadrant() const { return mHasFixedQuadrant; }
215 
222  void setHasFixedQuadrant( bool enabled ) { mHasFixedQuadrant = enabled; }
223 
230  QPointF quadOffset() const { return mQuadOffset; }
231 
236  void setQuadOffset( QPointF quadOffset ) { mQuadOffset = quadOffset; }
237 
242  QgsPointXY positionOffset() const { return mPositionOffset; }
243 
248  void setPositionOffset( const QgsPointXY &offset ) { mPositionOffset = offset; }
249 
256  Qgis::LabelOffsetType offsetType() const { return mOffsetType; }
257 
264  void setOffsetType( Qgis::LabelOffsetType type ) { mOffsetType = type; }
265 
270  double distLabel() const { return mDistLabel; }
271 
276  void setDistLabel( double dist ) { mDistLabel = dist; }
277 
283  QVector< Qgis::LabelPredefinedPointPosition > predefinedPositionOrder() const { return mPredefinedPositionOrder; }
284 
290  void setPredefinedPositionOrder( const QVector< Qgis::LabelPredefinedPointPosition > &order ) { mPredefinedPositionOrder = order; }
291 
296  double repeatDistance() const { return mRepeatDistance; }
297 
302  void setRepeatDistance( double dist ) { mRepeatDistance = dist; }
303 
305  bool alwaysShow() const { return mAlwaysShow; }
307  void setAlwaysShow( bool enabled ) { mAlwaysShow = enabled; }
308 
313  QgsLabeling::LinePlacementFlags arrangementFlags() const { return mArrangementFlags; }
314 
320  void setArrangementFlags( QgsLabeling::LinePlacementFlags flags ) { mArrangementFlags = flags; }
321 
328  QgsLabeling::PolygonPlacementFlags polygonPlacementFlags() const { return mPolygonPlacementFlags; }
329 
336  void setPolygonPlacementFlags( QgsLabeling::PolygonPlacementFlags flags ) { mPolygonPlacementFlags = flags; }
337 
344  QString labelText() const { return mLabelText; }
346  void setLabelText( const QString &text ) { mLabelText = text; }
347 
349  pal::Layer *layer() const { return mLayer; }
351  void setLayer( pal::Layer *layer ) { mLayer = layer; }
352 
354  QgsAbstractLabelProvider *provider() const;
355 
362  QgsFeature feature() const;
363 
370  void setFeature( const QgsFeature &feature );
371 
378  const QgsSymbol *symbol() const { return mSymbol; }
379 
387  void setSymbol( const QgsSymbol *symbol ) { mSymbol = symbol; }
388 
397  double overrunDistance() const;
398 
407  void setOverrunDistance( double distance );
408 
417  double overrunSmoothDistance() const;
418 
427  void setOverrunSmoothDistance( double distance );
428 
441  double lineAnchorPercent() const { return mLineAnchorPercent; }
442 
455  void setLineAnchorPercent( double percent ) { mLineAnchorPercent = percent; }
456 
464  QgsLabelLineSettings::AnchorType lineAnchorType() const { return mLineAnchorType; }
465 
473  void setLineAnchorType( QgsLabelLineSettings::AnchorType type ) { mLineAnchorType = type; }
474 
483  QgsLabelLineSettings::AnchorTextPoint lineAnchorTextPoint() const;
484 
493  void setLineAnchorTextPoint( QgsLabelLineSettings::AnchorTextPoint point ) { mAnchorTextPoint = point; }
494 
500  bool labelAllParts() const { return mLabelAllParts; }
501 
507  void setLabelAllParts( bool labelAllParts ) { mLabelAllParts = labelAllParts; }
508 
514  void setRotatedSize( QSizeF size ) { mRotatedSize = size; }
515 
522  const QgsLabelObstacleSettings &obstacleSettings() const;
523 
530  void setObstacleSettings( const QgsLabelObstacleSettings &settings );
531 
538  QgsCoordinateReferenceSystem originalFeatureCrs() const;
539 
546  void setOriginalFeatureCrs( const QgsCoordinateReferenceSystem &crs );
547 
555  double minimumSize() const { return mMinimumSize; }
556 
564  void setMinimumSize( double size ) { mMinimumSize = size; }
565 
572  Qgis::LabelOverlapHandling overlapHandling() const { return mOverlapHandling; }
573 
580  void setOverlapHandling( Qgis::LabelOverlapHandling handling ) { mOverlapHandling = handling; }
581 
592  bool allowDegradedPlacement() const { return mAllowDegradedPlacement; }
593 
604  void setAllowDegradedPlacement( bool allow ) { mAllowDegradedPlacement = allow; }
605 
606  protected:
608  pal::Layer *mLayer = nullptr;
609 
617  QSizeF mSize;
619  QSizeF mRotatedSize;
623  QSizeF mSymbolSize;
625  double mPriority = -1;
627  double mZIndex = 0;
629  bool mHasFixedPosition = false;
633  bool mHasFixedAngle = false;
635  double mFixedAngle = 0;
637  bool mHasFixedQuadrant = false;
639  QPointF mQuadOffset;
643  double mDistLabel = 0;
647  QVector< Qgis::LabelPredefinedPointPosition > mPredefinedPositionOrder;
649  double mRepeatDistance = 0;
651  bool mAlwaysShow = false;
653  QString mLabelText;
654 
656  double mOverrunDistance = 0;
658  double mOverrunSmoothDistance = 0;
659 
660  QgsLabeling::LinePlacementFlags mArrangementFlags = QgsLabeling::LinePlacementFlags();
661  QgsLabeling::PolygonPlacementFlags mPolygonPlacementFlags = QgsLabeling::PolygonPlacementFlag::AllowPlacementInsideOfPolygon;
662 
663  private:
664 
666  geos::unique_ptr mPermissibleZoneGeos;
667 
668  // TODO - not required when QgsGeometry caches geos preparedness
669  geos::prepared_unique_ptr mPermissibleZoneGeosPrepared;
670 
671  QgsFeature mFeature;
672 
673  const QgsSymbol *mSymbol = nullptr;
674 
675  bool mLabelAllParts = false;
676 
677  QgsLabelObstacleSettings mObstacleSettings{};
678 
679  QgsPointXY mAnchorPosition;
680 
681  double mLineAnchorPercent = 0.5;
684 
686  bool mAllowDegradedPlacement = false;
687 
688  QgsCoordinateReferenceSystem mOriginalFeatureCrs;
689 
690  double mMinimumSize = 0.0;
691 
692 };
693 
694 #endif // QGSLABELFEATURE_H
QgsLabelFeature::id
QgsFeatureId id() const
Identifier of the label (unique within the parent label provider)
Definition: qgslabelfeature.h:67
QgsLabelFeature::minimumSize
double minimumSize() const
Returns the minimum size (in map unit) for a feature to be labelled.
Definition: qgslabelfeature.h:555
QgsLabelFeature::positionOffset
QgsPointXY positionOffset() const
Applies only to "offset from point" placement strategy.
Definition: qgslabelfeature.h:242
QgsLabelFeature::offsetType
Qgis::LabelOffsetType offsetType() const
Returns the offset type, which determines how offsets and distance to label behaves.
Definition: qgslabelfeature.h:256
QgsLabelFeature::setRotatedSize
void setRotatedSize(QSizeF size)
Sets an alternate label size to be used when a label rotation angle is between 45 to 135 and 235 to 3...
Definition: qgslabelfeature.h:514
QgsLabelFeature::priority
double priority() const
Returns the feature's labeling priority.
Definition: qgslabelfeature.h:145
QgsLabelFeature::predefinedPositionOrder
QVector< Qgis::LabelPredefinedPointPosition > predefinedPositionOrder() const
Returns the priority ordered list of predefined positions for label candidates.
Definition: qgslabelfeature.h:283
QgsLabelFeature::fixedAngle
double fixedAngle() const
Angle in degrees of the fixed angle (relevant only if hasFixedAngle() returns true)
Definition: qgslabelfeature.h:204
QgsLabelFeature::setLineAnchorTextPoint
void setLineAnchorTextPoint(QgsLabelLineSettings::AnchorTextPoint point)
Sets the line anchor text point, which dictates which part of the label text should be placed at the ...
Definition: qgslabelfeature.h:493
QgsLabelFeature::setDistLabel
void setDistLabel(double dist)
Applies to "around point" placement strategy or linestring features.
Definition: qgslabelfeature.h:276
QgsLabelFeature::setPriority
void setPriority(double priority)
Sets the priority for labeling the feature.
Definition: qgslabelfeature.h:154
QgsLabelFeature::symbol
const QgsSymbol * symbol() const
Returns the feature symbol associated with this label.
Definition: qgslabelfeature.h:378
QgsLabelFeature::setPositionOffset
void setPositionOffset(const QgsPointXY &offset)
Applies only to "offset from point" placement strategy.
Definition: qgslabelfeature.h:248
QgsLabelFeature::setMinimumSize
void setMinimumSize(double size)
Sets the minimum size (in map unit) for a feature to be labelled.
Definition: qgslabelfeature.h:564
crs
const QgsCoordinateReferenceSystem & crs
Definition: qgswfsgetfeature.cpp:105
QgsLabelFeature::symbolSize
const QSizeF & symbolSize() const
Returns the size of the rendered symbol associated with this feature, if applicable.
Definition: qgslabelfeature.h:137
qgslabellinesettings.h
QgsLabelFeature::setOffsetType
void setOffsetType(Qgis::LabelOffsetType type)
Sets the offset type, which determines how offsets and distance to label behaves.
Definition: qgslabelfeature.h:264
qgsfeature.h
QgsLabelFeature::mId
QgsFeatureId mId
Associated ID unique within the parent label provider.
Definition: qgslabelfeature.h:611
QgsLabelFeature::visualMargin
const QgsMargins & visualMargin() const
Returns the visual margin for the label feature.
Definition: qgslabelfeature.h:120
QgsRenderContext
Contains information about the context of a rendering operation.
Definition: qgsrendercontext.h:59
QgsLabelObstacleSettings
Contains settings related to how the label engine treats features as obstacles.
Definition: qgslabelobstaclesettings.h:34
QgsSymbol
Abstract base class for all rendered symbols.
Definition: qgssymbol.h:92
QgsLabelFeature::permissibleZonePrepared
const GEOSPreparedGeometry * permissibleZonePrepared() const
Returns a GEOS prepared geometry representing the label's permissibleZone().
Definition: qgslabelfeature.h:99
QgsLabelFeature::arrangementFlags
QgsLabeling::LinePlacementFlags arrangementFlags() const
Returns the feature's arrangement flags.
Definition: qgslabelfeature.h:313
QgsLabelFeature::mQuadOffset
QPointF mQuadOffset
whether the side of the label is fixed (only for "around point" placement)
Definition: qgslabelfeature.h:639
pal
Definition: qgsdiagramrenderer.h:50
QgsLabelFeature::repeatDistance
double repeatDistance() const
Applies only to linestring features - after what distance (in map units) the labels should be repeate...
Definition: qgslabelfeature.h:296
QgsLabelFeature::hasFixedQuadrant
bool hasFixedQuadrant() const
Returns whether the quadrant for the label is fixed.
Definition: qgslabelfeature.h:214
Qgis::LabelOffsetType
LabelOffsetType
Behavior modifier for label offset and distance, only applies in some label placement modes.
Definition: qgis.h:607
geos::unique_ptr
std::unique_ptr< GEOSGeometry, GeosDeleter > unique_ptr
Scoped GEOS pointer.
Definition: qgsgeos.h:79
QgsLabelFeature::setSymbolSize
void setSymbolSize(QSizeF size)
Sets the size of the rendered symbol associated with this feature.
Definition: qgslabelfeature.h:128
QgsLabelFeature::mPermissibleZone
QgsGeometry mPermissibleZone
Optional geometry to use for label's permissible zone.
Definition: qgslabelfeature.h:615
QgsLabelFeature::allowDegradedPlacement
bool allowDegradedPlacement() const
Returns true if the label can be placed in inferior fallback positions if it cannot otherwise be plac...
Definition: qgslabelfeature.h:592
QgsLabelFeature::hasFixedPosition
bool hasFixedPosition() const
Whether the label should use a fixed position instead of being automatically placed.
Definition: qgslabelfeature.h:174
QgsAbstractLabelProvider
The QgsAbstractLabelProvider class is an interface class. Implementations return list of labels and t...
Definition: qgslabelingengine.h:52
QgsLabelFeature::mSize
QSizeF mSize
Width and height of the label.
Definition: qgslabelfeature.h:617
QgsLabelFeature::labelAllParts
bool labelAllParts() const
Returns true if all parts of the feature should be labeled.
Definition: qgslabelfeature.h:500
QgsLabelFeature::hasFixedAngle
bool hasFixedAngle() const
Whether the label should use a fixed angle instead of using angle from automatic placement.
Definition: qgslabelfeature.h:200
QgsLabelFeature::lineAnchorPercent
double lineAnchorPercent() const
Returns the percent along the line at which labels should be placed, for line labels only.
Definition: qgslabelfeature.h:441
QgsLabelFeature::mLabelText
QString mLabelText
text of the label
Definition: qgslabelfeature.h:653
QgsLabelFeature::setZIndex
void setZIndex(double zIndex)
Sets the label's z-index.
Definition: qgslabelfeature.h:171
QgsLabelFeature::setHasFixedAngle
void setHasFixedAngle(bool enabled)
Sets whether the label should use a fixed angle instead of using angle from automatic placement.
Definition: qgslabelfeature.h:202
QgsLabelFeature::setRepeatDistance
void setRepeatDistance(double dist)
Applies only to linestring features - set after what distance (in map units) the labels should be rep...
Definition: qgslabelfeature.h:302
QgsLabelFeature::lineAnchorType
QgsLabelLineSettings::AnchorType lineAnchorType() const
Returns the line anchor type, which dictates how the lineAnchorPercent() setting is handled.
Definition: qgslabelfeature.h:464
QgsLabelFeature::setHasFixedQuadrant
void setHasFixedQuadrant(bool enabled)
Sets whether the quadrant for the label must be respected.
Definition: qgslabelfeature.h:222
QgsLabelFeature::setLineAnchorType
void setLineAnchorType(QgsLabelLineSettings::AnchorType type)
Sets the line anchor type, which dictates how the lineAnchorPercent() setting is handled.
Definition: qgslabelfeature.h:473
QgsLabelLineSettings::AnchorTextPoint::CenterOfText
@ CenterOfText
Anchor using center of text.
QgsMargins
The QgsMargins class defines the four margins of a rectangle.
Definition: qgsmargins.h:37
QgsLabelFeature::setFixedPosition
void setFixedPosition(const QgsPointXY &point)
Sets coordinates of the fixed position (relevant only if hasFixedPosition() returns true)
Definition: qgslabelfeature.h:181
QgsLabelFeature::polygonPlacementFlags
QgsLabeling::PolygonPlacementFlags polygonPlacementFlags() const
Returns the polygon placement flags, which dictate how polygon labels can be placed.
Definition: qgslabelfeature.h:328
QgsLabelLineSettings::AnchorTextPoint
AnchorTextPoint
Anchor point of label text.
Definition: qgslabellinesettings.h:83
QgsLabelFeature::setLabelText
void setLabelText(const QString &text)
Sets text of the label.
Definition: qgslabelfeature.h:346
QgsLabelFeature::setHasFixedPosition
void setHasFixedPosition(bool enabled)
Sets whether the label should use a fixed position instead of being automatically placed.
Definition: qgslabelfeature.h:176
QgsLabelFeature::setPredefinedPositionOrder
void setPredefinedPositionOrder(const QVector< Qgis::LabelPredefinedPointPosition > &order)
Sets the priority ordered list of predefined positions for label candidates.
Definition: qgslabelfeature.h:290
QgsLabelFeature::setLabelAllParts
void setLabelAllParts(bool labelAllParts)
Sets whether all parts of the feature should be labeled.
Definition: qgslabelfeature.h:507
QgsLabelFeature::layer
pal::Layer * layer() const
Gets PAL layer of the label feature. Should be only used internally in PAL.
Definition: qgslabelfeature.h:349
QgsLabelLineSettings::AnchorType::HintOnly
@ HintOnly
Line anchor is a hint for preferred placement only, but other placements close to the hint are permit...
Qgis::LabelOffsetType::FromPoint
@ FromPoint
Offset distance applies from point geometry.
QgsCoordinateReferenceSystem
This class represents a coordinate reference system (CRS).
Definition: qgscoordinatereferencesystem.h:211
QgsLabelLineSettings::AnchorType
AnchorType
Line anchor types.
Definition: qgslabellinesettings.h:59
QgsLabelFeature::alwaysShow
bool alwaysShow() const
Whether label should be always shown (sets very high label priority)
Definition: qgslabelfeature.h:305
QgsPointXY
A class to represent a 2D point.
Definition: qgspointxy.h:58
qgslabeling.h
QgsLabelFeature::setLineAnchorPercent
void setLineAnchorPercent(double percent)
Sets the percent along the line at which labels should be placed, for line labels only.
Definition: qgslabelfeature.h:455
Qgis::LabelOverlapHandling::PreventOverlap
@ PreventOverlap
Do not allow labels to overlap other labels.
QgsLabelFeature::zIndex
double zIndex() const
Returns the label's z-index.
Definition: qgslabelfeature.h:162
QgsLabelFeature::setSymbol
void setSymbol(const QgsSymbol *symbol)
Sets the feature symbol associated with this label.
Definition: qgslabelfeature.h:387
QgsLabelFeature::setQuadOffset
void setQuadOffset(QPointF quadOffset)
Set which side of the point to use.
Definition: qgslabelfeature.h:236
QgsLabelFeature::geometry
GEOSGeometry * geometry() const
Gets access to the associated geometry.
Definition: qgslabelfeature.h:70
QgsLabelFeature::setOverlapHandling
void setOverlapHandling(Qgis::LabelOverlapHandling handling)
Sets the technique to use for handling overlapping labels for the feature.
Definition: qgslabelfeature.h:580
QgsLabelFeature::quadOffset
QPointF quadOffset() const
Applies to "offset from point" placement strategy and "around point" (in case hasFixedQuadrant() retu...
Definition: qgslabelfeature.h:230
QgsGeometry
A geometry is the spatial representation of a feature.
Definition: qgsgeometry.h:124
QgsLabelFeature::mSymbolSize
QSizeF mSymbolSize
Size of associated rendered symbol, if applicable.
Definition: qgslabelfeature.h:623
QgsLabelFeature::setPolygonPlacementFlags
void setPolygonPlacementFlags(QgsLabeling::PolygonPlacementFlags flags)
Sets the polygon placement flags, which dictate how polygon labels can be placed.
Definition: qgslabelfeature.h:336
QgsLabelFeature::overlapHandling
Qgis::LabelOverlapHandling overlapHandling() const
Returns the technique to use for handling overlapping labels for the feature.
Definition: qgslabelfeature.h:572
QgsLabelFeature::distLabel
double distLabel() const
Applies to "around point" placement strategy or linestring features.
Definition: qgslabelfeature.h:270
QgsLabelFeature::setLayer
void setLayer(pal::Layer *layer)
Assign PAL layer to the label feature. Should be only used internally in PAL.
Definition: qgslabelfeature.h:351
QgsLabelFeature::mPredefinedPositionOrder
QVector< Qgis::LabelPredefinedPointPosition > mPredefinedPositionOrder
Ordered list of predefined positions for label (only for OrderedPositionsAroundPoint placement)
Definition: qgslabelfeature.h:647
QgsLabelFeature::mFixedPosition
QgsPointXY mFixedPosition
fixed position for the label (instead of automatic placement)
Definition: qgslabelfeature.h:631
QgsLabelFeature::setFixedAngle
void setFixedAngle(double angle)
Sets angle in degrees of the fixed angle (relevant only if hasFixedAngle() returns true)
Definition: qgslabelfeature.h:206
QgsLabelFeature::fixedPosition
QgsPointXY fixedPosition() const
Coordinates of the fixed position (relevant only if hasFixedPosition() returns true)
Definition: qgslabelfeature.h:178
pal::Layer
A set of features which influence the labeling process.
Definition: layer.h:62
geos::prepared_unique_ptr
std::unique_ptr< const GEOSPreparedGeometry, GeosDeleter > prepared_unique_ptr
Scoped GEOS prepared geometry pointer.
Definition: qgsgeos.h:84
QgsFeature
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Definition: qgsfeature.h:55
QgsLabelFeature::setVisualMargin
void setVisualMargin(const QgsMargins &margin)
Sets the visual margin for the label feature.
Definition: qgslabelfeature.h:114
QgsLabelFeature
The QgsLabelFeature class describes a feature that should be used within the labeling engine....
Definition: qgslabelfeature.h:57
QgsLabelFeature::setArrangementFlags
void setArrangementFlags(QgsLabeling::LinePlacementFlags flags)
Sets the feature's arrangement flags.
Definition: qgslabelfeature.h:320
QgsLabelFeature::mVisualMargin
QgsMargins mVisualMargin
Visual margin of label contents.
Definition: qgslabelfeature.h:621
QgsLabelFeature::mPositionOffset
QgsPointXY mPositionOffset
offset of label from the feature (only for "offset from point" placement)
Definition: qgslabelfeature.h:641
MathUtils::angle
double ANALYSIS_EXPORT angle(QgsPoint *p1, QgsPoint *p2, QgsPoint *p3, QgsPoint *p4)
Calculates the angle between two segments (in 2 dimension, z-values are ignored)
Definition: MathUtils.cpp:786
QgsLabelFeature::permissibleZone
QgsGeometry permissibleZone() const
Returns the label's permissible zone geometry.
Definition: qgslabelfeature.h:91
QgsLabelFeature::mRotatedSize
QSizeF mRotatedSize
Width and height of the label when rotated between 45 to 135 and 235 to 315 degrees;.
Definition: qgslabelfeature.h:619
qgscoordinatereferencesystem.h
Qgis::LabelOverlapHandling
LabelOverlapHandling
Label overlap handling.
Definition: qgis.h:545
QgsLabelFeature::labelText
QString labelText() const
Text of the label.
Definition: qgslabelfeature.h:344
qgsgeos.h
QgsLabelFeature::mGeometry
geos::unique_ptr mGeometry
Geometry of the feature to be labelled.
Definition: qgslabelfeature.h:613
QgsLabelFeature::setAlwaysShow
void setAlwaysShow(bool enabled)
Sets whether label should be always shown (sets very high label priority)
Definition: qgslabelfeature.h:307
QgsFeatureId
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features
Definition: qgsfeatureid.h:28
qgslabelobstaclesettings.h
QgsLabelFeature::setAllowDegradedPlacement
void setAllowDegradedPlacement(bool allow)
Sets whether the label can be placed in inferior fallback positions if it cannot otherwise be placed.
Definition: qgslabelfeature.h:604
qgsmargins.h