QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
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.
~QgsTextLabelFeature() override
Clean up.
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.
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.
Stores information relating to individual character formatting.
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.
Perform transforms between map coordinates and device coordinates.
Represents a document consisting of one or more QgsTextBlock objects.
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.
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features
QgsTextLabelFeature(QgsFeatureId id, GEOSGeometry *geometry, const QSizeF &size)
Construct text label feature.