15#ifndef QGSLABELINGENGINESETTINGS_H
16#define QGSLABELINGENGINESETTINGS_H
55 void setFlags( Qgis::LabelingFlags flags ) { mFlags = flags; }
57 Qgis::LabelingFlags
flags()
const {
return mFlags; }
101 Q_UNUSED( candPoint )
103 Q_UNUSED( candPolygon )
112 Q_UNUSED( candPoint )
114 Q_UNUSED( candPolygon )
130 void readSettingsFromProject(
QgsProject *project );
132 void writeSettingsToProject(
QgsProject *project );
146 return mDefaultTextRenderFormat;
157 mDefaultTextRenderFormat = format;
166 QColor unplacedLabelColor()
const;
174 void setUnplacedLabelColor(
const QColor &color );
196 Search mSearchMethod = Chain;
199 double mMaxLineCandidatesPerCm = 5;
200 double mMaxPolygonCandidatesPerCmSquared = 2.5;
202 QColor mUnplacedLabelColor = QColor( 255, 0, 0 );
LabelingFlag
Various flags that affect drawing and placement of labels.
@ UsePartialCandidates
Whether to use also label candidates that are partially outside of the map view.
TextRenderFormat
Flags which control how map layer renderers behave.
@ AlwaysOutlines
Always render text using path objects (AKA outlines/curves). This setting guarantees the best quality...
LabelPlacementEngineVersion
Labeling placement engine version.
@ Version2
Version 2 (default for new projects since QGIS 3.12)
Stores global configuration for labeling engine.
Q_DECL_DEPRECATED void numCandidatePositions(int &candPoint, int &candLine, int &candPolygon) const
Gets number of candidate positions that will be generated for each label feature.
Qgis::TextRenderFormat defaultTextRenderFormat() const
Returns the default text rendering format for the labels.
void setDefaultTextRenderFormat(Qgis::TextRenderFormat format)
Sets the default text rendering format for the labels.
void setFlag(Qgis::LabelingFlag f, bool enabled=true)
Sets whether a particual flag is enabled.
Q_DECL_DEPRECATED Search searchMethod() const
Which search method to use for removal collisions between labels.
Search
Search methods in the PAL library to remove colliding labels (methods have different processing speed...
void setMaximumPolygonCandidatesPerCmSquared(double candidates)
Sets the maximum number of polygon label candidates per centimeter squared.
bool testFlag(Qgis::LabelingFlag f) const
Test whether a particular flag is enabled.
Qgis::LabelingFlags flags() const
Gets flags of the labeling engine.
Q_DECL_DEPRECATED void setNumCandidatePositions(int candPoint, int candLine, int candPolygon)
Sets the number of candidate positions that will be generated for each label feature.
void setFlags(Qgis::LabelingFlags flags)
Sets flags of the labeling engine.
double maximumPolygonCandidatesPerCmSquared() const
Returns the maximum number of polygon label candidate positions per centimeter squared.
Q_DECL_DEPRECATED void setSearchMethod(Search s)
Used to set which search method to use for removal collisions between labels.
void setMaximumLineCandidatesPerCm(double candidates)
Sets the maximum number of line label candidates per centimeter.
double maximumLineCandidatesPerCm() const
Returns the maximum number of line label candidate positions per centimeter.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...