QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
Go to the documentation of this file.
15 #ifndef QGSTEXTLABELFEATURE_H
16 #define QGSTEXTLABELFEATURE_H
46 QString
text(
int partId )
const;
112 #endif //QGSTEXTLABELFEATURE_H
void setDocument(const QgsTextDocument &document)
Sets the document for the label.
QString text(int partId) const
Returns the text component corresponding to a specified label part.
const QMap< QgsPalLayerSettings::Property, QVariant > & dataDefinedValues() const
Gets data-defined values.
bool hasCharacterFormat(int partId) const
Returns true if the feature contains specific character formatting for the part with matching ID.
QFontMetricsF * labelFontMetrics()
Metrics of the font for rendering.
~QgsTextLabelFeature()
Clean up.
QFontMetricsF * mFontMetrics
Metrics of the font for rendering.
QgsTextCharacterFormat characterFormat(int partId) const
Returns the character format corresponding to the specified label part.
QFont mDefinedFont
Font for rendering.
QMap< QgsPalLayerSettings::DataDefinedProperties, QVariant > mDataDefinedValues
Stores attribute values for data defined properties.
Class that adds extra information to QgsLabelFeature for text labels.
QStringList mClusters
List of graphemes (used for curved labels)
std::unique_ptr< GEOSGeometry, GeosDeleter > unique_ptr
Scoped GEOS pointer.
QList< QgsTextCharacterFormat > mCharacterFormats
QgsTextDocument mDocument
void setDefinedFont(const QFont &f)
Sets font to be used for rendering.
void calculateInfo(bool curvedLabeling, QFontMetricsF *fm, const QgsMapToPixel *xform, double fontScale, double maxinangle, double maxoutangle)
calculate data for info(). setDefinedFont() must have been called already.
QFont definedFont()
Font to be used for rendering.
QSizeF size(double angle=0.0) const
Size of the label (in map units)
GEOSGeometry * geometry() const
Gets access to the associated geometry.
QgsTextDocument document() const
Returns the document for the label.
void setDataDefinedValues(const QMap< QgsPalLayerSettings::Property, QVariant > &values)
Sets data-defined values.
The QgsLabelFeature class describes a feature that should be used within the labeling engine....
QMap< QgsPalLayerSettings::Property, QVariant > mDataDefinedValues
Stores attribute values for data defined properties.
QgsTextLabelFeature(QgsFeatureId id, GEOSGeometry *geometry, const QSizeF &size)
Construct text label feature.