|
| Pal () |
| Create an new pal instance. More...
|
|
| Pal (const Pal &other)=delete |
| Pal cannot be copied. More...
|
|
| ~Pal () |
|
Layer * | addLayer (QgsAbstractLabelProvider *provider, const QString &layerName, Qgis::LabelPlacement arrangement, double defaultPriority, bool active, bool toLabel) |
| add a new layer More...
|
|
bool | candidatesAreConflicting (const LabelPosition *lp1, const LabelPosition *lp2) const |
| Returns true if a labelling candidate lp1 conflicts with lp2. More...
|
|
std::unique_ptr< Problem > | extractProblem (const QgsRectangle &extent, const QgsGeometry &mapBoundary, QgsRenderContext &context) |
| Extracts the labeling problem for the specified map extent - only features within this extent will be considered. More...
|
|
int | globalCandidatesLimitLine () const |
| Returns the global candidates limit for line features, or 0 if no global limit is in effect. More...
|
|
int | globalCandidatesLimitPoint () const |
| Returns the global candidates limit for point features, or 0 if no global limit is in effect. More...
|
|
int | globalCandidatesLimitPolygon () const |
| Returns the global candidates limit for polygon features, or 0 if no global limit is in effect. More...
|
|
bool | isCanceled () |
| Check whether the job has been canceled. More...
|
|
double | maximumLineCandidatesPerMapUnit () const |
| Returns the maximum number of line label candidate positions per map unit. More...
|
|
double | maximumPolygonCandidatesPerMapUnitSquared () const |
| Returns the maximum number of polygon label candidate positions per map unit squared. More...
|
|
Pal & | operator= (const Pal &other)=delete |
| Pal cannot be copied. More...
|
|
QgsLabelingEngineSettings::PlacementEngineVersion | placementVersion () const |
| Returns the placement engine version, which dictates how the label placement problem is solved. More...
|
|
void | registerCancellationCallback (FnIsCanceled fnCanceled, void *context) |
| Register a function that returns whether this job has been canceled - PAL calls it during the computation. More...
|
|
void | removeLayer (Layer *layer) |
| remove a layer More...
|
|
void | setMaximumLineCandidatesPerMapUnit (double candidates) |
| Sets the maximum number of line label candidates per map unit. More...
|
|
void | setMaximumPolygonCandidatesPerMapUnitSquared (double candidates) |
| Sets the maximum number of polygon label candidates per map unit squared. More...
|
|
void | setPlacementVersion (QgsLabelingEngineSettings::PlacementEngineVersion placementVersion) |
| Sets the placement engine version, which dictates how the label placement problem is solved. More...
|
|
void | setShowPartialLabels (bool show) |
| Sets whether partial labels show be allowed. More...
|
|
bool | showPartialLabels () const |
| Returns whether partial labels should be allowed. More...
|
|
QList< LabelPosition * > | solveProblem (Problem *prob, QgsRenderContext &context, bool displayAll, QList< pal::LabelPosition * > *unlabeled=nullptr) |
| Solves the labeling problem, selecting the best candidate locations for all labels and returns a list of these calculated label positions. More...
|
|
Main Pal labeling class.
A pal object will contains layers and global information such as which search method will be used.
- Note
- not available in Python bindings
Definition at line 79 of file pal.h.
Solves the labeling problem, selecting the best candidate locations for all labels and returns a list of these calculated label positions.
If displayAll is true
, then the best positions for ALL labels will be returned, regardless of whether these labels overlap other labels.
If the optional unlabeled list is specified, it will be filled with a list of all feature labels which could not be placed in the returned solution (e.g. due to overlaps or other constraints).
Ownership of the returned labels is not transferred - it resides with the pal object.
Definition at line 568 of file pal.cpp.