15 #ifndef QGSLABELINGENGINESETTINGS_H 16 #define QGSLABELINGENGINESETTINGS_H 18 #include "qgis_core.h" 36 UseAllLabels = 1 << 1,
37 UsePartialCandidates = 1 << 2,
39 RenderOutlineLabels = 1 << 3,
40 DrawLabelRectOnly = 1 << 4,
41 DrawCandidates = 1 << 5,
42 DrawUnplacedLabels = 1 << 6,
44 Q_DECLARE_FLAGS( Flags,
Flag )
67 void setFlags( Flags flags ) { mFlags = flags; }
69 Flags
flags()
const {
return mFlags; }
73 void setFlag(
Flag f,
bool enabled =
true ) {
if ( enabled ) mFlags |= f;
else mFlags &= ~f; }
76 void numCandidatePositions(
int &candPoint,
int &candLine,
int &candPolygon )
const { candPoint = mCandPoint; candLine = mCandLine; candPolygon = mCandPolygon; }
78 void setNumCandidatePositions(
int candPoint,
int candLine,
int candPolygon ) { mCandPoint = candPoint; mCandLine = candLine; mCandPolygon = candPolygon; }
93 void readSettingsFromProject(
QgsProject *project );
95 void writeSettingsToProject(
QgsProject *project );
109 return mDefaultTextRenderFormat;
120 mDefaultTextRenderFormat = format;
129 QColor unplacedLabelColor()
const;
137 void setUnplacedLabelColor(
const QColor &color );
145 int mCandPoint = 16, mCandLine = 50, mCandPolygon = 30;
147 QColor mUnplacedLabelColor = QColor( 255, 0, 0 );
153 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsLabelingEngineSettings::Flags )
155 #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.
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).
Encapsulates a QGIS project, including sets of map layers and their styles, layouts, annotations, canvases, etc.
TextRenderFormat
Options for rendering text.
Q_DECL_DEPRECATED void setSearchMethod(Search s)
Used to set which search method to use for removal collisions between labels.
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) ...
Q_DECL_DEPRECATED Search searchMethod() const
Which search method to use for removal collisions between labels.
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...
void setFlag(Flag f, bool enabled=true)
Sets whether a particual flag is enabled.
Flags flags() const
Gets flags of the labeling engine.