24 : mRenderContext( renderContext )
31 return mMapBoundaryGeometry;
36 mMapBoundaryGeometry = geometry;
67 return candidateBounds;
83 other->mIsActive = mIsActive;
Abstract base class for labeling engine rules.
virtual void alterCandidateCost(pal::LabelPosition *candidate, QgsLabelingEngineContext &context) const
Provides an opportunity for the rule to alter the cost for a candidate.
virtual void resolveReferences(const QgsProject *project)
Resolves reference to layers from stored layer ID.
void setActive(bool active)
Sets whether the rule is active.
virtual bool isAvailable() const
Returns true if the rule is available for use within the current QGIS environment.
virtual QgsRectangle modifyCandidateConflictSearchBoundingBox(const QgsRectangle &candidateBounds) const
Returns a (possibly expanded) bounding box to use when searching for conflicts for a candidate.
bool active() const
Returns true if the rule is active.
virtual bool candidatesAreConflicting(const pal::LabelPosition *lp1, const pal::LabelPosition *lp2) const
Returns true if a labeling candidate lp1 conflicts with lp2 after applying the rule.
virtual ~QgsAbstractLabelingEngineRule()
virtual QString displayType() const =0
Returns a user-friendly, translated string representing the rule type.
virtual QString description() const
Returns a user-friendly description of the rule.
virtual bool candidateIsIllegal(const pal::LabelPosition *candidate, QgsLabelingEngineContext &context) const
Returns true if a labeling candidate violates the rule and should be eliminated.
virtual void copyCommonProperties(QgsAbstractLabelingEngineRule *other) const
Copies common properties from this object to an other.
A geometry is the spatial representation of a feature.
Encapsulates the context for a labeling engine run.
QgsGeometry mapBoundaryGeometry() const
Returns the map label boundary geometry, which defines the limits within which labels may be placed i...
void setMapBoundaryGeometry(const QgsGeometry &geometry)
Sets the map label boundary geometry, which defines the limits within which labels may be placed in t...
void setExtent(const QgsRectangle &extent)
Sets the map extent defining the limits for labeling.
QgsRectangle extent() const
Returns the map extent defining the limits for labeling.
QgsLabelingEngineContext(QgsRenderContext &renderContext)
Constructor for QgsLabelingEngineContext.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
A rectangle specified with double values.
Contains information about the context of a rendering operation.
LabelPosition is a candidate feature label position.