21 #ifndef QGSPALLABELING_H 22 #define QGSPALLABELING_H 26 #include <QFontDatabase> 243 FontLetterSpacing = 28,
244 FontWordSpacing = 29,
248 MultiLineWrapChar = 31,
249 MultiLineHeight = 32,
250 MultiLineAlignment = 33,
254 DirSymbPlacement = 37,
266 BufferJoinStyle = 44,
267 BufferBlendMode = 45,
277 ShapeRotationType = 52,
280 ShapeOffsetUnits = 55,
282 ShapeRadiiUnits = 57,
283 ShapeTransparency = 63,
286 ShapeBorderColor = 59,
287 ShapeBorderWidth = 60,
288 ShapeBorderWidthUnits = 61,
294 ShadowOffsetAngle = 67,
295 ShadowOffsetDist = 68,
296 ShadowOffsetUnits = 69,
298 ShadowRadiusUnits = 71,
299 ShadowTransparency = 72,
302 ShadowBlendMode = 75,
312 CurvedCharAngleInOut = 83,
320 RepeatDistanceUnit = 86,
322 PredefinedPositionOrder = 91,
325 ScaleVisibility = 23,
569 bool active,
bool useExpr,
const QString& expr,
const QString& field );
577 void removeAllDataDefinedProperties();
675 enum DataDefinedValueType
693 bool dataDefinedValEval( DataDefinedValueType valType,
697 void parseTextStyle(
QFont& labelFont,
745 , mUseOrigin( false )
747 , mRotationOffset( 0.0 )
748 , mUseRotation( false )
750 , mUseCenter( false )
753 , mPicture( nullptr )
754 , mPictureBuffer( 0.0 )
770 void setRotation(
const double rotation ) { mRotation = rotation; }
810 double mRotationOffset;
826 double mPictureBuffer;
878 void numCandidatePositions(
int& candPoint,
int& candLine,
int& candPolygon );
879 void setNumCandidatePositions(
int candPoint,
int candLine,
int candPolygon );
881 enum Search {
Chain, Popmusic_Tabu, Popmusic_Chain, Popmusic_Tabu_Chain, Falp };
883 void setSearchMethod(
Search s );
884 Search searchMethod()
const;
886 bool isShowingCandidates()
const;
887 void setShowingCandidates(
bool showing );
891 bool isShowingShadowRectangles()
const;
892 void setShowingShadowRectangles(
bool showing );
894 bool isShowingAllLabels()
const;
895 void setShowingAllLabels(
bool showing );
897 bool isShowingPartialsLabels()
const;
898 void setShowingPartialsLabels(
bool showing );
901 bool isDrawingOutlineLabels()
const;
902 void setDrawingOutlineLabels(
bool outline );
909 bool drawLabelRectOnly()
const;
917 void setDrawLabelRectOnly(
bool drawRect );
923 Q_DECL_DEPRECATED
virtual void init(
QgsMapRenderer* mr )
override;
932 static bool staticWillUseLayer(
const QString& layerID );
935 virtual void clearActiveLayers()
override;
937 virtual void clearActiveLayer(
const QString& layerID )
override;
959 virtual void exit()
override;
991 void loadEngineSettings();
992 void saveEngineSettings();
993 void clearEngineSettings();
1061 void deleteTemporaryData();
1089 #endif // QGSPALLABELING_H
Label below point, slightly right of center.
Class for parsing and evaluation of expressions (formerly called "search strings").
A rectangle specified with double values.
Label on bottom-left of point.
double maxCurvedCharAngleOut
QHash< QString, QgsVectorLayerLabelProvider * > mLabelProviders
hashtable of label providers, being filled during labeling (key = layer ID)
QString leftDirectionSymbol
QgsMapUnitScale shapeSizeMapUnitScale
A container class for data source field mapping or expression.
QgsMapUnitScale shadowRadiusMapUnitScale
double rotationOffset() const
void setOrigin(const QgsPoint &point)
SizeUnit repeatDistanceUnit
A class to query the labeling structure at a given point (small wraper around pal RTree class) ...
UpsideDownLabels upsidedownLabels
double obstacleFactor
Obstacle factor, where 1.0 = default, < 1.0 more likely to be covered by labels, 1.0 less likely to be covered
Label on top-left of point.
QgsLabelCandidate(const QRectF &r, double c)
QPainter::CompositionMode bufferBlendMode
PredefinedPointPosition
Positions for labels when using the QgsPalLabeling::OrderedPositionsAroundPoint placement mode...
QgsMapUnitScale shadowOffsetMapUnitScale
Candidates are placed in predefined positions around a point.
#define Q_NOWARN_DEPRECATED_PUSH
QuadrantPosition quadOffset
void setUseOrigin(const bool use)
Class that adds extra information to QgsLabelFeature for text labels.
The QgsLabelingEngineV2 class provides map labeling functionality.
Container of fields for a vector layer.
Label on top of point, slightly right of center.
The QgsVectorLayerLabelProvider class implements a label provider for vector layers.
A geometry is the spatial representation of a feature.
bool drawLabels
Whether to draw labels for this layer.
QHash< QString, QgsVectorLayerDiagramProvider * > mDiagramProviders
hashtable of diagram providers (key = layer ID)
void setUseCenter(const bool use)
QgsMapUnitScale repeatDistanceMapUnitScale
MultiLineAlign multilineAlign
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
A non GUI class for rendering a map layer set onto a QPainter.
QMap< QgsPalLayerSettings::DataDefinedProperties, QPair< QString, int > > dataDefinedNames() const
Map of data defined enum to names and old-style indecies The QPair contains a new string for layer pr...
QVector< PredefinedPointPosition > predefinedPositionOrder
Ordered list of predefined label positions for points.
double maxCurvedCharAngleIn
bool reverseDirectionSymbol
void setRotationOffset(const double rotation)
const QgsPoint & offset() const
Qt::PenJoinStyle bufferJoinStyle
double zIndex
Z-Index of label, where labels with a higher z-index are rendered on top of labels with a lower z-ind...
Arranges candidates following the curvature of a line feature.
QgsMapUnitScale fontSizeMapUnitScale
The QgsMapSettings class contains configuration for rendering of the map.
QgsMapUnitScale shapeBorderWidthMapUnitScale
Perform transforms between map coordinates and device coordinates.
Q_DECL_DEPRECATED void setStoredWithProject(bool store)
ObstacleType obstacleType
Controls how features act as obstacles for labels.
void setRotation(const double rotation)
const QgsCoordinateTransform * ct
QgsMapUnitScale shapeRadiiMapUnitScale
Offset distance applies from point geometry.
double rasterCompressFactor
bool bufferSizeInMapUnits
QgsPalLayerSettings mInvalidLayerSettings
SizeUnit shapeBorderWidthUnits
QPainter::CompositionMode blendMode
The QgsVectorLayerDiagramProvider class implements support for diagrams within the labeling engine...
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
void setCenter(const QgsPoint &point)
Arranges candidates in a circle around a point (or centroid of a polygon).
const QgsMapToPixel * xform
QMap< QgsPalLayerSettings::DataDefinedProperties, QgsDataDefined *> dataDefinedProperties
Map of current data defined properties.
void setText(const QString &text)
QgsMapUnitScale bufferSizeMapUnitScale
OffsetType
Behaviour modifier for label offset and distance, only applies in some label placement modes...
QPainter::CompositionMode shapeBlendMode
SizeUnit shadowOffsetUnits
SizeUnit
Units used for option sizes, before being converted to rendered sizes.
const QgsPoint & center() const
A class to represent a point.
Qt::PenJoinStyle shapeJoinStyle
Offset distance applies from rendered symbol bounds.
const QgsPoint & origin() const
void setDpiRatio(const double ratio)
double pictureBuffer() const
unsigned int placementFlags
#define Q_NOWARN_DEPRECATED_POP
Placement
Placement modes which determine how label candidates are generated for a feature. ...
QString rightDirectionSymbol
Arranges candidates over a point (or centroid of a polygon), or at a preset offset from the point...
const QgsPoint & size() const
Contains information about the context of a rendering operation.
void setPicture(QPicture *picture)
The QgsLabelFeature class describes a feature that should be used within the labeling engine...
void setOffset(const QgsPoint &point)
QgsMapUnitScale distMapUnitScale
Struct for storing maximum and minimum scales for measurements in map units.
bool fitInPolygonOnly
True if only labels which completely fit within a polygon are allowed.
bool shadowRadiusAlphaOnly
OffsetType offsetType
Offset type for layer (only applies in certain placement modes)
Label below point, slightly left of center.
SizeUnit shadowRadiusUnits
LabelPosition is a candidate feature label position.
Label on top of point, slightly left of center.
const QPicture * picture() const
bool labelOffsetInMapUnits
QPainter::CompositionMode shadowBlendMode
bool isExpression
Is this label made from a expression string eg FieldName || 'mm'.
void setSize(const QgsPoint &point)
Class that stores computed placement from labeling engine.
QgsMapUnitScale shapeOffsetMapUnitScale
LinePlacementFlags
Line placement flags, which control how candidates are generated for a linear feature.
QList< QgsLabelCandidate > mCandidates
Labeling engine interface.
void setPictureBuffer(const double buffer)
SizeUnit shapeOffsetUnits
Q_DECL_DEPRECATED const QList< QgsLabelCandidate > & candidates()
void setUseRotation(const bool use)
Represents a vector layer which manages a vector based data sets.
Maintains current state of more grainular and temporal values when creating/painting component parts ...
RotationType shapeRotationType
QgsMapUnitScale labelOffsetMapUnitScale
ObstacleType
Valid obstacle types, which affect how features within the layer will act as obstacles for labels...
DirectionSymbols placeDirectionSymbol
Arranges candidates scattered throughout a polygon feature.
QgsLabelingEngineV2 * mEngine
New labeling engine to interface with PAL.
Q_DECL_DEPRECATED bool isStoredWithProject() const