36 #include "qgis_core.h" 40 #include <QLinkedList> 50 template<
class DATATYPE,
class ELEMTYPE,
int NUMDIMS,
class ELEMTYPEREAL,
int TMAXNODES,
int TMINNODES>
class RTree;
73 enum LabelMode { LabelPerFeature, LabelPerFeaturePart };
96 QString
name()
const {
return mName; }
170 void setPriority(
double priority );
177 double priority()
const {
return mDefaultPriority; }
246 void joinConnectedFeatures();
256 void chopFeaturesAtRepeatDistance();
315 void addFeaturePart(
FeaturePart *fpart,
const QString &labelText = QString() );
QList< FeaturePart * > mObstacleParts
List of obstacle parts.
QHash< QgsFeatureId, int > mConnectedFeaturesIds
UpsideDownLabels upsidedownLabels() const
Returns how upside down labels are handled within the layer.
bool active() const
Returns whether the layer is currently active.
bool labelLayer() const
Returns whether the layer will be labeled or not.
QHash< QgsFeatureId, QgsLabelFeature * > mHashtable
Lookup table of label features (owned by the label feature provider that created them) ...
A set of features which influence the labeling process.
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.
void setObstacleType(QgsPalLayerSettings::ObstacleType obstacleType)
Sets the obstacle type, which controls how features within the layer act as obstacles for labels...
void setCentroidInside(bool forceInside)
Sets whether labels placed at the centroid of features within the layer are forced to be placed insid...
bool mergeConnectedLines() const
Returns whether connected lines will be merged before labeling.
QHash< QString, QVector< FeaturePart * > > mConnectedHashtable
QgsPalLayerSettings::Placement arrangement() const
Returns the layer's arrangement policy.
RTree< FeaturePart *, double, 2, double, 8, 4 > * mFeatureIndex
QgsPalLayerSettings::ObstacleType obstacleType() const
Returns the obstacle type, which controls how features within the layer act as obstacles for labels...
void setArrangement(QgsPalLayerSettings::Placement arrangement)
Sets the layer's arrangement policy.
int featureCount()
Returns the number of features in layer.
QgsAbstractLabelProvider * provider() const
Returns pointer to the associated provider.
QgsPalLayerSettings::ObstacleType mObstacleType
Main class to handle feature.
The QgsAbstractLabelProvider class is an interface class.
Placement
Placement modes which determine how label candidates are generated for a feature. ...
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...
QLinkedList< FeaturePart * > mFeatureParts
List of feature parts.
RTree< FeaturePart *, double, 2, double, 8, 4 > * mObstacleIndex
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.
Representation of a labeling problem.
QgsPalLayerSettings::Placement mArrangement
Optional flags used for some placement methods.
bool isCurved() const
Returns true if the layer has curved labels.
LabelMode labelMode() const
Returns the layer's labeling mode.
UpsideDownLabels mUpsidedownLabels
void setMergeConnectedLines(bool merge)
Sets whether connected lines should be merged before labeling.
ObstacleType
Valid obstacle types, which affect how features within the layer will act as obstacles for labels...