15 #ifndef QGSLABELINGENGINESETTINGS_H 16 #define QGSLABELINGENGINESETTINGS_H 18 #include "qgis_core.h" 35 UseAllLabels = 1 << 1,
36 UsePartialCandidates = 1 << 2,
37 RenderOutlineLabels = 1 << 3,
38 DrawLabelRectOnly = 1 << 4,
39 DrawCandidates = 1 << 5,
41 Q_DECLARE_FLAGS( Flags,
Flag )
62 void setFlags( Flags flags ) { mFlags = flags; }
64 Flags
flags()
const {
return mFlags; }
68 void setFlag(
Flag f,
bool enabled =
true ) {
if ( enabled ) mFlags |=
f;
else mFlags &= ~f; }
71 void numCandidatePositions(
int &candPoint,
int &candLine,
int &candPolygon )
const { candPoint = mCandPoint; candLine = mCandLine; candPolygon = mCandPolygon; }
73 void setNumCandidatePositions(
int candPoint,
int candLine,
int candPolygon ) { mCandPoint = candPoint; mCandLine = candLine; mCandPolygon = candPolygon; }
81 void readSettingsFromProject(
QgsProject *project );
83 void writeSettingsToProject(
QgsProject *project );
91 int mCandPoint = 16, mCandLine = 50, mCandPolygon = 30;
95 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsLabelingEngineSettings::Flags )
97 #endif // QGSLABELINGENGINESETTINGS_H
void setFlags(Flags flags)
Set flags of the labeling engine.
void setSearchMethod(Search s)
Set which search method to use for removal collisions between labels.
Flag
Various flags that affect drawing and placement of labels.
Reads and writes project states.
void numCandidatePositions(int &candPoint, int &candLine, int &candPolygon) const
Get 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)
Set 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)
Set whether a particual flag is enabled.
Flags flags() const
Get flags of the labeling engine.