mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-07 00:15:48 -04:00
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
22 lines
707 B
Python
22 lines
707 B
Python
# The following has been generated automatically from src/core/labeling/rules/qgslabelingenginerule_impl.h
|
|
try:
|
|
QgsAbstractLabelingEngineRuleDistanceFromFeature.__group__ = ['labeling', 'rules']
|
|
except NameError:
|
|
pass
|
|
try:
|
|
QgsLabelingEngineRuleMinimumDistanceLabelToFeature.__group__ = ['labeling', 'rules']
|
|
except NameError:
|
|
pass
|
|
try:
|
|
QgsLabelingEngineRuleMaximumDistanceLabelToFeature.__group__ = ['labeling', 'rules']
|
|
except NameError:
|
|
pass
|
|
try:
|
|
QgsLabelingEngineRuleMinimumDistanceLabelToLabel.__group__ = ['labeling', 'rules']
|
|
except NameError:
|
|
pass
|
|
try:
|
|
QgsLabelingEngineRuleAvoidLabelOverlapWithFeature.__group__ = ['labeling', 'rules']
|
|
except NameError:
|
|
pass
|