22 : mFlags( UsePartialCandidates )
34 mSearchMethod =
static_cast< Search >( prj->
readNumEntry( QStringLiteral(
"PAL" ), QStringLiteral(
"/SearchMethod" ), static_cast< int >(
Chain ), &saved ) );
35 mCandPoint = prj->
readNumEntry( QStringLiteral(
"PAL" ), QStringLiteral(
"/CandidatesPoint" ), 16, &saved );
36 mCandLine = prj->
readNumEntry( QStringLiteral(
"PAL" ), QStringLiteral(
"/CandidatesLine" ), 50, &saved );
37 mCandPolygon = prj->
readNumEntry( QStringLiteral(
"PAL" ), QStringLiteral(
"/CandidatesPolygon" ), 30, &saved );
40 if ( prj->
readBoolEntry( QStringLiteral(
"PAL" ), QStringLiteral(
"/ShowingCandidates" ),
false, &saved ) ) mFlags |=
DrawCandidates;
42 if ( prj->
readBoolEntry( QStringLiteral(
"PAL" ), QStringLiteral(
"/ShowingAllLabels" ),
false, &saved ) ) mFlags |=
UseAllLabels;
47 if ( !prj->
readBoolEntry( QStringLiteral(
"PAL" ), QStringLiteral(
"/DrawOutlineLabels" ),
true ) )
50 const int projectTextFormat = prj->
readNumEntry( QStringLiteral(
"PAL" ), QStringLiteral(
"/TextFormat" ), -1 );
51 if ( projectTextFormat >= 0 )
57 project->
writeEntry( QStringLiteral(
"PAL" ), QStringLiteral(
"/SearchMethod" ), static_cast< int >( mSearchMethod ) );
58 project->
writeEntry( QStringLiteral(
"PAL" ), QStringLiteral(
"/CandidatesPoint" ), mCandPoint );
59 project->
writeEntry( QStringLiteral(
"PAL" ), QStringLiteral(
"/CandidatesLine" ), mCandLine );
60 project->
writeEntry( QStringLiteral(
"PAL" ), QStringLiteral(
"/CandidatesPolygon" ), mCandPolygon );
62 project->
writeEntry( QStringLiteral(
"PAL" ), QStringLiteral(
"/ShowingCandidates" ), mFlags.testFlag(
DrawCandidates ) );
64 project->
writeEntry( QStringLiteral(
"PAL" ), QStringLiteral(
"/ShowingAllLabels" ), mFlags.testFlag(
UseAllLabels ) );
67 project->
writeEntry( QStringLiteral(
"PAL" ), QStringLiteral(
"/TextFormat" ), static_cast< int >( mDefaultTextRenderFormat ) );
Always render text as text objects.
Whether to use also label candidates that are partially outside of the map view.
Whether to only draw the label rect and not the actual label text (used for unit tests) ...
void readSettingsFromProject(QgsProject *project)
Read configuration of the labeling engine from a project.
void clear()
Returns the configuration to the defaults.
Whether to draw all labels even if there would be collisions.
bool writeEntry(const QString &scope, const QString &key, bool value)
Write a boolean entry to the project file.
Always render text using path objects (AKA outlines/curves).
Reads and writes project states.
TextRenderFormat
Options for rendering text.
Whether to draw rectangles of generated candidates (good for debugging)
int readNumEntry(const QString &scope, const QString &key, int def=0, bool *ok=nullptr) const
QgsLabelingEngineSettings()
bool readBoolEntry(const QString &scope, const QString &key, bool def=false, bool *ok=nullptr) const
void writeSettingsToProject(QgsProject *project)
Write configuration of the labeling engine to a project.
Search
Search methods in the PAL library to remove colliding labels (methods have different processing speed...