mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-15 00:02:52 -04:00
For the "Around point" and "Cartographic" placement modes, this adds a new optional setting for the maximum distance of the labels from the feature. It's used together with the existing distance setting to define a range of distances at which labels may be placed from their corresponding point features. This adds more flexibility to the placement for these layers, ultimately allowing for more labels to be placed in busy maps. When the layer is set to the "around point" mode, then label candidates which are closer to the point will always be prefered over those which are further away. When the layer is set to the "cartographic" mode, then the default behavior is also to prioritize closer labels. A new combo box allows users to control the priority, with an option for prefering position ordering. If this option is set, then candidates at the corresponding positions (eg top left) are preferred regardless of how far they are from the point, with the labelling falling back to alternate positions only when no labels can be placed up to the maximum label distance. Sponsored by Rubicon Concierge Real Estate Services
95 lines
3.0 KiB
Plaintext
95 lines
3.0 KiB
Plaintext
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/labeling/qgslabelplacementsettings.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
class QgsLabelPlacementSettings
|
|
{
|
|
%Docstring(signature="appended")
|
|
|
|
Contains general settings related to how labels are placed.
|
|
|
|
.. versionadded:: 3.26
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgslabelplacementsettings.h"
|
|
%End
|
|
public:
|
|
|
|
Qgis::LabelOverlapHandling overlapHandling() const;
|
|
%Docstring
|
|
Returns the technique used to handle overlapping labels.
|
|
|
|
.. seealso:: :py:func:`setOverlapHandling`
|
|
%End
|
|
|
|
void setOverlapHandling( Qgis::LabelOverlapHandling handling );
|
|
%Docstring
|
|
Sets the technique used to handle overlapping labels.
|
|
|
|
.. seealso:: :py:func:`overlapHandling`
|
|
%End
|
|
|
|
bool allowDegradedPlacement() const;
|
|
%Docstring
|
|
Returns ``True`` if labels can be placed in inferior fallback positions if they cannot otherwise
|
|
be placed.
|
|
|
|
For instance, this will permit a curved line label to fallback to a horizontal label at the end of the line
|
|
if the label cannot otherwise be placed on the line in a curved manner.
|
|
|
|
.. seealso:: :py:func:`setAllowDegradedPlacement`
|
|
%End
|
|
|
|
void setAllowDegradedPlacement( bool allow );
|
|
%Docstring
|
|
Sets whether labels can be placed in inferior fallback positions if they cannot otherwise
|
|
be placed.
|
|
|
|
For instance, this will permit a curved line label to fallback to a horizontal label at the end of the line
|
|
if the label cannot otherwise be placed on the line in a curved manner.
|
|
|
|
.. seealso:: :py:func:`allowDegradedPlacement`
|
|
%End
|
|
|
|
Qgis::LabelPrioritization prioritization() const;
|
|
%Docstring
|
|
Returns the label prioritization technique.
|
|
|
|
.. seealso:: :py:func:`setPrioritization`
|
|
|
|
.. versionadded:: 3.38
|
|
%End
|
|
|
|
void setPrioritization( Qgis::LabelPrioritization prioritization );
|
|
%Docstring
|
|
Sets the technique used to prioritize labels.
|
|
|
|
.. seealso:: :py:func:`prioritization`
|
|
|
|
.. versionadded:: 3.38
|
|
%End
|
|
|
|
void updateDataDefinedProperties( const QgsPropertyCollection &properties, QgsExpressionContext &context );
|
|
%Docstring
|
|
Updates the placement settings to respect any data defined properties
|
|
set within the specified ``properties`` collection.
|
|
%End
|
|
|
|
};
|
|
|
|
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/labeling/qgslabelplacementsettings.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|