35 #include <QLinkedList>
44 template<
class DATATYPE,
class ELEMTYPE,
int NUMDIMS,
class ELEMTYPEREAL,
int TMAXNODES,
int TMINNODES>
class RTree;
68 enum LabelMode { LabelPerFeature, LabelPerFeaturePart };
161 void setPriority(
double priority );
167 double priority()
const {
return mDefaultPriority; }
242 void joinConnectedFeatures();
245 void chopFeaturesAtRepeatDistance();
UpsideDownLabels upsidedownLabels() const
Returns how upside down labels are handled within the layer.
ObstacleType obstacleType() const
Returns the obstacle type, which controls how features within the layer act as obstacles for labels...
QLinkedList< FeaturePart * > mFeatureParts
List of feature parts.
bool active() const
Returns whether the layer is currently active.
QStringList mConnectedTexts
Arrangement arrangement() const
Returns the layer's arrangement policy.
bool labelLayer() const
Returns whether the layer will be labeled or not.
A layer of spacial entites.
QHash< QgsFeatureId, QgsLabelFeature * > mHashtable
Lookup table of label features (owned by the label feature provider that created them) ...
void setObstacleType(ObstacleType obstacleType)
Sets the obstacle type, which controls how features within the layer act as obstacles for labels...
Arrangement mArrangement
Optional flags used for some placement methods.
double priority() const
Returns the layer's priority, between 0 and 1.
bool centroidInside() const
Returns whether labels placed at the centroid of features within the layer are forced to be placed in...
void setUpsidedownLabels(UpsideDownLabels ud)
Sets how upside down labels will be handled within the layer.
ObstacleType mObstacleType
void setCentroidInside(bool forceInside)
Sets whether labels placed at the centroid of features within the layer are forced to be placed insid...
void setArrangement(Arrangement arrangement)
Sets the layer's arrangement policy.
void setFitInPolygonOnly(bool fitInPolygon)
Sets whether labels which do not fit completely within a polygon feature are discarded.
bool mergeConnectedLines() const
Returns whether connected lines will be merged before labeling.
Optional additional info about label (for curved labels)
int featureCount()
Returns the number of features in layer.
QgsAbstractLabelProvider * provider() const
Returns pointer to the associated provider.
Main class to handle feature.
The QgsAbstractLabelProvider class is an interface class.
void setArrangementFlags(const LineArrangementFlags &flags)
Sets the layer's arrangement flags.
bool fitInPolygonOnly() const
Returns whether labels which do not fit completely within a polygon feature are discarded.
LineArrangementFlags mArrangementFlags
bool extractFeatCallback(FeaturePart *ft_ptr, void *ctx)
QHash< QString, QLinkedList< FeaturePart * > * > mConnectedHashtable
Arrangement
The way to arrange labels against spatial entities.
void setActive(bool active)
Sets whether the layer is currently active.
void setLabelLayer(bool toLabel)
Sets whether the layer will be labeled.
QgsAbstractLabelProvider * mProvider
The QgsLabelFeature class describes a feature that should be used within the labeling engine...
void setLabelMode(LabelMode mode)
Sets the layer's labeling mode.
LabelPosition is a candidate feature label position.
QString name() const
Returns the layer's name.
LineArrangementFlags arrangementFlags() const
Returns the layer's arrangement flags.
RTree< FeaturePart *, double, 2, double, 8, 4 > * rtree
LabelMode labelMode() const
Returns the layer's labeling mode.
UpsideDownLabels mUpsidedownLabels
void setMergeConnectedLines(bool merge)
Sets whether connected lines should be merged before labeling.