|
| 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, QgsPalLayerSettings::Placement arrangement, double defaultPriority, bool active, bool toLabel, bool displayAll=false) |
| add a new layer More...
|
|
std::unique_ptr< Problem > | extractProblem (const QgsRectangle &extent, const QgsGeometry &mapBoundary) |
| Extracts the labeling problem for the specified map extent - only features within this extent will be considered. More...
|
|
int | getLineP () |
| Returns the number of candidates to generate for line features. More...
|
|
int | getPointP () |
| Returns the number of candidates to generate for point features. More...
|
|
int | getPolyP () |
| Returns the number of candidates to generate for polygon features. More...
|
|
bool | getShowPartial () |
| Returns whether partial labels should be allowed. More...
|
|
bool | isCanceled () |
| Check whether the job has been canceled. More...
|
|
Pal & | operator= (const Pal &other)=delete |
| Pal cannot be copied. 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 | setLineP (int line_p) |
| set maximum # candidates to generate for lines features Higher the value is, longer Pal::labeller will spend time More...
|
|
void | setPointP (int point_p) |
| set # candidates to generate for points features Higher the value is, longer Pal::labeller will spend time More...
|
|
void | setPolyP (int poly_p) |
| set maximum # candidates to generate for polygon features Higher the value is, longer Pal::labeller will spend time More...
|
|
void | setShowPartial (bool show) |
| Set flag show partial label. More...
|
|
QList< LabelPosition * > | solveProblem (Problem *prob, 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 87 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 425 of file pal.cpp.