15#ifndef QGSTEXTLABELFEATURE_H
16#define QGSTEXTLABELFEATURE_H
49 QString text(
int partId )
const;
66 bool hasCharacterFormat(
int partId )
const;
69 const QMap< QgsPalLayerSettings::Property, QVariant > &
dataDefinedValues()
const {
return mDataDefinedValues; }
71 void setDataDefinedValues(
const QMap< QgsPalLayerSettings::Property, QVariant > &values ) { mDataDefinedValues = values; }
170 double mMaximumCharacterAngleInside = 0;
171 double mMaximumCharacterAngleOutside = 0;
The QgsLabelFeature class describes a feature that should be used within the labeling engine.
Perform transforms between map coordinates and device coordinates.
Contains precalculated properties regarding text metrics for text to be renderered at a later stage.
Contains information about the context of a rendering operation.
Stores information relating to individual character formatting.
Contains pre-calculated metrics of a QgsTextDocument.
Represents a document consisting of one or more QgsTextBlock objects.
Class that adds extra information to QgsLabelFeature for text labels.
const QgsPrecalculatedTextMetrics * textMetrics() const
Returns additional info required for curved label placement.
void setMaximumCharacterAngleInside(double angle)
Sets the maximum angle (in radians) between inside curved label characters.
double maximumCharacterAngleInside() const
Returns the maximum angle (in radians) between inside curved label characters.
void setDefinedFont(const QFont &f)
Sets font to be used for rendering.
QFont definedFont() const
Font to be used for rendering.
void setTextMetrics(const QgsPrecalculatedTextMetrics &metrics)
Sets additional text metrics required for curved label placement.
QgsTextDocument mDocument
~QgsTextLabelFeature() override
Clean up.
void setMaximumCharacterAngleOutside(double angle)
Sets the maximum angle (in radians) between outside curved label characters.
const QgsTextDocumentMetrics & documentMetrics() const
Returns the document metrics for the label.
const QgsTextDocument & document() const
Returns the document for the label.
void setDataDefinedValues(const QMap< QgsPalLayerSettings::Property, QVariant > &values)
Sets data-defined values.
QFont mDefinedFont
Font for rendering.
QgsTextDocumentMetrics mDocumentMetrics
QMap< QgsPalLayerSettings::Property, QVariant > mDataDefinedValues
Stores attribute values for data defined properties.
const QMap< QgsPalLayerSettings::Property, QVariant > & dataDefinedValues() const
Gets data-defined values.
double maximumCharacterAngleOutside() const
Returns the maximum angle (in radians) between outside curved label characters.
std::optional< QgsPrecalculatedTextMetrics > mTextMetrics
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features