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,
|
2019-07-19 11:55:15 +10:00
|
|
|
DrawUnplacedLabels,
|
2017-04-21 18:04:09 +08:00
|
|
|
};
|
|
|
|
typedef QFlags<QgsLabelingEngineSettings::Flag> Flags;
|
|
|
|
|
|
|
|
|
2019-07-29 09:55:35 +10:00
|
|
|
|
2017-04-21 18:04:09 +08:00
|
|
|
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
|
|
|
|
|
2019-07-29 09:55:35 +10:00
|
|
|
void setSearchMethod( Search s ) /Deprecated/;
|
2017-04-21 18:04:09 +08:00
|
|
|
%Docstring
|
2019-07-29 09:55:35 +10:00
|
|
|
Used to set which search method to use for removal collisions between labels
|
|
|
|
|
|
|
|
.. deprecated:: since QGIS 3.10 - Chain is always used.
|
2017-04-21 18:04:09 +08:00
|
|
|
%End
|
2019-07-29 09:55:35 +10:00
|
|
|
|
|
|
|
Search searchMethod() const /Deprecated/;
|
2017-04-21 18:04:09 +08:00
|
|
|
%Docstring
|
|
|
|
Which search method to use for removal collisions between labels
|
2019-07-29 09:55:35 +10:00
|
|
|
|
|
|
|
.. deprecated:: since QGIS 3.10 - Chain is always used.
|
2017-04-21 18:04:09 +08:00
|
|
|
%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
|
2019-07-19 11:55:15 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
QColor unplacedLabelColor() const;
|
|
|
|
%Docstring
|
|
|
|
Returns the color to use when rendering unplaced labels.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setUnplacedLabelColor`
|
|
|
|
|
|
|
|
.. versionadded:: 3.10
|
|
|
|
%End
|
|
|
|
|
|
|
|
void setUnplacedLabelColor( const QColor &color );
|
|
|
|
%Docstring
|
|
|
|
Sets the ``color`` to use when rendering unplaced labels.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`unplacedLabelColor`
|
|
|
|
|
|
|
|
.. versionadded:: 3.10
|
2018-11-28 08:16:21 +10:00
|
|
|
%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 *
|
|
|
|
************************************************************************/
|