2017-04-21 18:04:09 +08:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/qgslabelingenginesettings.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class QgsLabelingEngineSettings
|
|
|
|
{
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Stores global configuration for labeling engine
|
|
|
|
|
2017-04-21 18:04:09 +08:00
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
|
|
|
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgslabelingenginesettings.h"
|
|
|
|
%End
|
|
|
|
public:
|
|
|
|
enum Flag
|
|
|
|
{
|
|
|
|
UseAllLabels,
|
|
|
|
UsePartialCandidates,
|
2018-11-28 08:16:21 +10:00
|
|
|
// TODO QGIS 4.0: remove
|
2017-04-21 18:04:09 +08:00
|
|
|
RenderOutlineLabels,
|
|
|
|
DrawLabelRectOnly,
|
|
|
|
DrawCandidates,
|
|
|
|
};
|
|
|
|
typedef QFlags<QgsLabelingEngineSettings::Flag> Flags;
|
|
|
|
|
|
|
|
|
|
|
|
enum Search
|
|
|
|
{
|
|
|
|
Chain,
|
|
|
|
Popmusic_Tabu,
|
|
|
|
Popmusic_Chain,
|
|
|
|
Popmusic_Tabu_Chain,
|
|
|
|
Falp
|
|
|
|
};
|
|
|
|
|
|
|
|
QgsLabelingEngineSettings();
|
|
|
|
|
|
|
|
void clear();
|
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Returns the configuration to the defaults
|
2017-04-21 18:04:09 +08:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setFlags( Flags flags );
|
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Sets flags of the labeling engine
|
2017-04-21 18:04:09 +08:00
|
|
|
%End
|
|
|
|
Flags flags() const;
|
|
|
|
%Docstring
|
2018-05-26 18:44:30 +10:00
|
|
|
Gets flags of the labeling engine
|
2017-04-21 18:04:09 +08:00
|
|
|
%End
|
|
|
|
bool testFlag( Flag f ) const;
|
|
|
|
%Docstring
|
|
|
|
Test whether a particular flag is enabled
|
|
|
|
%End
|
|
|
|
void setFlag( Flag f, bool enabled = true );
|
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Sets whether a particual flag is enabled
|
2017-04-21 18:04:09 +08:00
|
|
|
%End
|
|
|
|
|
|
|
|
void numCandidatePositions( int &candPoint, int &candLine, int &candPolygon ) const;
|
|
|
|
%Docstring
|
2018-05-26 18:44:30 +10:00
|
|
|
Gets number of candidate positions that will be generated for each label feature (default to 8)
|
2017-04-21 18:04:09 +08:00
|
|
|
%End
|
|
|
|
void setNumCandidatePositions( int candPoint, int candLine, int candPolygon );
|
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Sets number of candidate positions that will be generated for each label feature
|
2017-04-21 18:04:09 +08:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setSearchMethod( Search s );
|
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Sets which search method to use for removal collisions between labels
|
2017-04-21 18:04:09 +08:00
|
|
|
%End
|
|
|
|
Search searchMethod() const;
|
|
|
|
%Docstring
|
|
|
|
Which search method to use for removal collisions between labels
|
|
|
|
%End
|
|
|
|
|
|
|
|
void readSettingsFromProject( QgsProject *project );
|
|
|
|
%Docstring
|
|
|
|
Read configuration of the labeling engine from a project
|
|
|
|
%End
|
|
|
|
void writeSettingsToProject( QgsProject *project );
|
|
|
|
%Docstring
|
|
|
|
Write configuration of the labeling engine to a project
|
|
|
|
%End
|
|
|
|
|
2018-11-28 08:16:21 +10:00
|
|
|
|
|
|
|
QgsRenderContext::TextRenderFormat defaultTextRenderFormat() const;
|
|
|
|
%Docstring
|
|
|
|
Returns the default text rendering format for the labels.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setDefaultTextRenderFormat`
|
|
|
|
|
|
|
|
.. versionadded:: 3.4.3
|
|
|
|
%End
|
|
|
|
|
|
|
|
void setDefaultTextRenderFormat( QgsRenderContext::TextRenderFormat format );
|
|
|
|
%Docstring
|
|
|
|
Sets the default text rendering ``format`` for the labels.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`defaultTextRenderFormat`
|
|
|
|
|
|
|
|
.. versionadded:: 3.4.3
|
|
|
|
%End
|
|
|
|
|
2017-04-21 18:04:09 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
QFlags<QgsLabelingEngineSettings::Flag> operator|(QgsLabelingEngineSettings::Flag f1, QFlags<QgsLabelingEngineSettings::Flag> f2);
|
|
|
|
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/qgslabelingenginesettings.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|