15#ifndef QGSLABELINGENGINESETTINGS_H
16#define QGSLABELINGENGINESETTINGS_H
112 Q_UNUSED( candPoint )
114 Q_UNUSED( candPolygon )
123 Q_UNUSED( candPoint )
125 Q_UNUSED( candPolygon )
147 void readSettingsFromProject(
QgsProject *project );
154 void writeSettingsToProject(
QgsProject *project );
166 void writeXml( QDomDocument &doc, QDomElement &element,
const QgsReadWriteContext &context )
const;
189 void resolveReferences(
const QgsProject *project );
203 return mDefaultTextRenderFormat;
214 mDefaultTextRenderFormat = format;
223 QColor unplacedLabelColor()
const;
231 void setUnplacedLabelColor(
const QColor &color );
257 QList< QgsAbstractLabelingEngineRule * > rules();
267 QList< const QgsAbstractLabelingEngineRule * > rules() const
SIP_SKIP;
295 Qgis::LabelingFlags mFlags =
Qgis::LabelingFlag::UsePartialCandidates;
297 Search mSearchMethod = Chain;
300 double mMaxLineCandidatesPerCm = 5;
301 double mMaxPolygonCandidatesPerCmSquared = 2.5;
303 QColor mUnplacedLabelColor = QColor( 255, 0, 0 );
305 Qgis::LabelPlacementEngineVersion mPlacementVersion =
Qgis::LabelPlacementEngineVersion::Version2;
307 Qgis::TextRenderFormat mDefaultTextRenderFormat =
Qgis::TextRenderFormat::AlwaysOutlines;
Provides global constants and enumerations for use throughout the application.
LabelingFlag
Various flags that affect drawing and placement of labels.
TextRenderFormat
Options for rendering text.
QFlags< LabelingFlag > LabelingFlags
Flags that affect drawing and placement of labels.
LabelPlacementEngineVersion
Labeling placement engine version.
Abstract base class for labeling engine rules.
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.
QgsLabelingEngineSettings()
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.
void clear()
Returns the configuration to the defaults.
~QgsLabelingEngineSettings()
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.
QgsLabelingEngineSettings & operator=(const QgsLabelingEngineSettings &other)
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,...
A container for the context for various read/write operations on objects.