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
sip doesn't use the standard Python staticmethod type for defining
static methods, which means that standard means of testing
for a static method (like `isinstance(..., staticmethod)`) fail
with any PyQGIS static methods.
This causes issues with lint tools, which incorrectly flag
calls to QGIS static methods as missing self arguments. It also
breaks detection of static methods in the sphinx PyQGIS docs,
so all static methods are shown as non-static.
Work around this in sipify, by wrapping unambiguously static
methods in staticmethod wrappers.