Deprecate old methods and make methods always take QgsSldExportContext.
Add capacity to QgsSldExportContext to collect export errors and
warnings.
The old API had no way to reliably report errors/warnings during
export to users.
Improves the appearance of labels in situations like road networks,
where things like dual carriageways, service roads, etc can result
in many labels of the exact same text appearing close to each other.
When active, removes any labels with the exact same text (case
sensitive!) which are closer then this minimum distance.
The setting applies across layers, so duplicate text from ANY
layer will be considered.
For stable API use only, and then cleanup the private version
of this to remove all the consideration of 3.0 API compatibility.
Mark the archive copy as deprecated and remove in 4.0
This method has become completely unweildy because of all the
compatibility code. By making this private only we can rip
out all this old code and make the method much simpler and
easy to understand.
See https://github.com/qgis/QGIS-Enhancement-Proposals/issues/299
Implements the API framework for setting advanced labeling engine
rules for a project, and implements 4 initial rule types:
- QgsLabelingEngineRuleMinimumDistanceLabelToFeature: prevents labels
being placed too *close* to features from a different layer
- QgsLabelingEngineRuleMaximumDistanceLabelToFeature: prevents labels
being placed too *far* from features from a different layer
- QgsLabelingEngineRuleMinimumDistanceLabelToLabel: prevents labels
being placed too close to labels from a different layer
- QgsLabelingEngineRuleAvoidLabelOverlapWithFeature: prevents labels
being placed overlapping features from a different layer
(note that the first 3 rules require a build based on GEOS >= 3.10,
they are not available for older GEOS builds)
Also implements a registry for storing available rule classes,
and serialization of rules and configuration in QGIS projects
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
The original workaround was only supposed to apply to QList/
QVector of QVariantMaps. By replacing them all in sip we
break mapping of signals defined in c++ which are emitted
by Python code.
Fixes exceptions after running processing algorithms in Qt6
builds.
The old sip based approach to handling property -> getter/setter
conversion is broken on sip6, so move the patching into Python.
Also fix incorrect checks in tests, and add additional test
for compatiblity code.
And make sipify handle this nicely. This means that all our non-flag
style enums correctly map across to IntFlag python enums on Qt 6,
fixing issues with negative enum values for these and providing
a better match for the original c++ enum.