15 #ifndef QGSLABELINGENGINESETTINGS_H 16 #define QGSLABELINGENGINESETTINGS_H 18 #include "qgis_core.h" 35 UseAllLabels = 1 << 1,
36 UsePartialCandidates = 1 << 2,
38 RenderOutlineLabels = 1 << 3,
39 DrawLabelRectOnly = 1 << 4,
40 DrawCandidates = 1 << 5,
42 Q_DECLARE_FLAGS( Flags,
Flag )
63 void setFlags( Flags flags ) { mFlags = flags; }
65 Flags
flags()
const {
return mFlags; }
69 void setFlag(
Flag f,
bool enabled =
true ) {
if ( enabled ) mFlags |= f;
else mFlags &= ~f; }
72 void numCandidatePositions(
int &candPoint,
int &candLine,
int &candPolygon )
const { candPoint = mCandPoint; candLine = mCandLine; candPolygon = mCandPolygon; }
74 void setNumCandidatePositions(
int candPoint,
int candLine,
int candPolygon ) { mCandPoint = candPoint; mCandLine = candLine; mCandPolygon = candPolygon; }
82 void readSettingsFromProject(
QgsProject *project );
84 void writeSettingsToProject(
QgsProject *project );
98 return mDefaultTextRenderFormat;
109 mDefaultTextRenderFormat = format;
118 int mCandPoint = 16, mCandLine = 50, mCandPolygon = 30;
124 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsLabelingEngineSettings::Flags )
126 #endif // QGSLABELINGENGINESETTINGS_H
QgsRenderContext::TextRenderFormat defaultTextRenderFormat() const
Returns the default text rendering format for the labels.
void setFlags(Flags flags)
Sets flags of the labeling engine.
void setSearchMethod(Search s)
Sets which search method to use for removal collisions between labels.
Flag
Various flags that affect drawing and placement of labels.
void setDefaultTextRenderFormat(QgsRenderContext::TextRenderFormat format)
Sets the default text rendering format for the labels.
Always render text using path objects (AKA outlines/curves).
Reads and writes project states.
TextRenderFormat
Options for rendering text.
void numCandidatePositions(int &candPoint, int &candLine, int &candPolygon) const
Gets number of candidate positions that will be generated for each label feature (default to 8) ...
Stores global configuration for labeling engine.
bool testFlag(Flag f) const
Test whether a particular flag is enabled.
void setNumCandidatePositions(int candPoint, int candLine, int candPolygon)
Sets number of candidate positions that will be generated for each label feature. ...
Search
Search methods in the PAL library to remove colliding labels (methods have different processing speed...
Search searchMethod() const
Which search method to use for removal collisions between labels.
void setFlag(Flag f, bool enabled=true)
Sets whether a particual flag is enabled.
Flags flags() const
Gets flags of the labeling engine.