36 #include "qgis_core.h" 
   45 #include <QStringList> 
   46 #include <unordered_map> 
  119       void removeLayer( 
Layer *layer );
 
  121       typedef bool ( *FnIsCanceled )( 
void *ctx );
 
  124       void registerCancellationCallback( FnIsCanceled fnCanceled, 
void *context );
 
  127       inline bool isCanceled() { 
return fnIsCanceled ? fnIsCanceled( fnIsCanceledContext ) : 
false; }
 
  150       QList<LabelPosition *> solveProblem( 
Problem *prob, 
bool displayAll, QList<pal::LabelPosition *> *unlabeled = 
nullptr );
 
  157       void setShowPartialLabels( 
bool show );
 
  164       bool showPartialLabels() 
const;
 
  246       std::unordered_map< QgsAbstractLabelProvider *, std::unique_ptr< Layer > > mLayers;
 
  258       int mEjChainDeg = 50;
 
  260       double mCandListSize = 0.2;
 
  265       bool mShowPartialLabels = 
true;
 
  267       double mMaxLineCandidatesPerMapUnit = 0;
 
  268       double mMaxPolygonCandidatesPerMapUnitSquared = 0;
 
  270       int mGlobalCandidatesLimitPoint = 0;
 
  271       int mGlobalCandidatesLimitLine = 0;
 
  272       int mGlobalCandidatesLimitPolygon = 0;
 
  277       FnIsCanceled fnIsCanceled = 
nullptr;
 
  279       void *fnIsCanceledContext = 
nullptr;
 
  292       void setPopmusicR( 
int r );
 
  298       void setMinIt( 
int min_it );
 
  304       void setMaxIt( 
int max_it );
 
  310       void setTenure( 
int tenure );
 
  316       void setEjChainDeg( 
int degree );
 
  322       void setCandListSize( 
double fact );
 
The QgsAbstractLabelProvider class is an interface class.
A geometry is the spatial representation of a feature.
PlacementEngineVersion
Placement engine version.
@ PlacementEngineVersion2
Version 2 (default for new projects since QGIS 3.12)
Placement
Placement modes which determine how label candidates are generated for a feature.
A rectangle specified with double values.
Main class to handle feature.
A set of features which influence the labeling process.
double maximumLineCandidatesPerMapUnit() const
Returns the maximum number of line label candidate positions per map unit.
Pal & operator=(const Pal &other)=delete
Pal cannot be copied.
int globalCandidatesLimitPoint() const
Returns the global candidates limit for point features, or 0 if no global limit is in effect.
double maximumPolygonCandidatesPerMapUnitSquared() const
Returns the maximum number of polygon label candidate positions per map unit squared.
void setMaximumPolygonCandidatesPerMapUnitSquared(double candidates)
Sets the maximum number of polygon label candidates per map unit squared.
int globalCandidatesLimitLine() const
Returns the global candidates limit for line features, or 0 if no global limit is in effect.
void setMaximumLineCandidatesPerMapUnit(double candidates)
Sets the maximum number of line label candidates per map unit.
bool isCanceled()
Check whether the job has been canceled.
Pal(const Pal &other)=delete
Pal cannot be copied.
int globalCandidatesLimitPolygon() const
Returns the global candidates limit for polygon features, or 0 if no global limit is in effect.
Representation of a labeling problem.
SearchMethod
Search method to use.
@ FALP
Only initial solution.
@ POPMUSIC_TABU
Is a little bit better than CHAIN but slower.
@ POPMUSIC_CHAIN
Is slower and best than TABU, worse and faster than TABU_CHAIN.
@ CHAIN
Is the worst but fastest method.
@ POPMUSIC_TABU_CHAIN
Is the best but slowest.