QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
|
Default QgsLabelingEngine implementation, which completes the whole labeling operation (including label rendering) in the run() method. More...
#include <qgslabelingengine.h>
Public Member Functions | |
QgsDefaultLabelingEngine () | |
Construct the labeling engine with default settings. More... | |
QgsDefaultLabelingEngine (const QgsDefaultLabelingEngine &rh)=delete | |
QgsDefaultLabelingEngine cannot be copied. More... | |
QgsDefaultLabelingEngine & | operator= (const QgsDefaultLabelingEngine &rh)=delete |
QgsDefaultLabelingEngine cannot be copied. More... | |
void | run (QgsRenderContext &context) override |
Runs the labeling job. More... | |
Public Member Functions inherited from QgsLabelingEngine | |
QgsLabelingEngine () | |
Construct the labeling engine with default settings. More... | |
QgsLabelingEngine (const QgsLabelingEngine &rh)=delete | |
QgsLabelingEngine cannot be copied. More... | |
virtual | ~QgsLabelingEngine () |
Clean up everything (especially the registered providers) More... | |
void | addProvider (QgsAbstractLabelProvider *provider) |
Add provider of label features. Takes ownership of the provider. More... | |
const QgsLabelingEngineSettings & | engineSettings () const |
Gets associated labeling engine settings. More... | |
const QgsMapSettings & | mapSettings () const |
Gets associated map settings. More... | |
QgsLabelingEngine & | operator= (const QgsLabelingEngine &rh)=delete |
QgsLabelingEngine cannot be copied. More... | |
QStringList | participatingLayerIds () const |
Returns a list of layer IDs for layers with providers in the engine. More... | |
QList< QgsMapLayer * > | participatingLayers () const |
Returns a list of layers with providers in the engine. More... | |
void | removeProvider (QgsAbstractLabelProvider *provider) |
Remove provider if the provider's initialization failed. Provider instance is deleted. More... | |
QgsLabelingResults * | results () const |
For internal use by the providers. More... | |
virtual void | run (QgsRenderContext &context)=0 |
Runs the labeling job. More... | |
void | setMapSettings (const QgsMapSettings &mapSettings) |
Associate map settings instance. More... | |
QgsLabelingResults * | takeResults () |
Returns pointer to recently computed results and pass the ownership of results to the caller. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from QgsLabelingEngine | |
void | cleanup () |
Cleans up the engine following a call to registerLabels() or solve(). More... | |
void | drawLabels (QgsRenderContext &context, const QString &layerId=QString()) |
Draws labels to the specified render context. More... | |
void | processProvider (QgsAbstractLabelProvider *provider, QgsRenderContext &context, pal::Pal &p) |
void | registerLabels (QgsRenderContext &context) |
Runs the label registration step. More... | |
void | solve (QgsRenderContext &context) |
Solves the label problem. More... | |
Protected Attributes inherited from QgsLabelingEngine | |
QList< pal::LabelPosition * > | mLabels |
QgsMapSettings | mMapSettings |
Associated map settings instance. More... | |
std::unique_ptr< pal::Pal > | mPal |
std::unique_ptr< pal::Problem > | mProblem |
QList< QgsAbstractLabelProvider * > | mProviders |
List of providers (the are owned by the labeling engine) More... | |
std::unique_ptr< QgsLabelingResults > | mResults |
Resulting labeling layout. More... | |
QList< QgsAbstractLabelProvider * > | mSubProviders |
QList< pal::LabelPosition * > | mUnlabeled |
Default QgsLabelingEngine implementation, which completes the whole labeling operation (including label rendering) in the run() method.
Definition at line 464 of file qgslabelingengine.h.
QgsDefaultLabelingEngine::QgsDefaultLabelingEngine | ( | ) |
Construct the labeling engine with default settings.
Definition at line 557 of file qgslabelingengine.cpp.
|
delete |
QgsDefaultLabelingEngine cannot be copied.
|
delete |
QgsDefaultLabelingEngine cannot be copied.
|
overridevirtual |
Runs the labeling job.
Depending on the concrete labeling engine class, this will either run the whole labeling job, including rendering the labels themselves, OR possibly just run the labeling job but leave the rendering to a future, deferred stage.
Implements QgsLabelingEngine.
Definition at line 563 of file qgslabelingengine.cpp.