29 if ( !dataDefinedLineArrangement.isEmpty() )
53 if ( value.compare( QLatin1String(
"visible" ), Qt::CaseInsensitive ) == 0 )
55 else if ( value.compare( QLatin1String(
"entire" ), Qt::CaseInsensitive ) == 0 )
66 if ( value.compare( QLatin1String(
"hint" ), Qt::CaseInsensitive ) == 0 )
68 else if ( value.compare( QLatin1String(
"strict" ), Qt::CaseInsensitive ) == 0 )
79 if ( value.compare( QLatin1String(
"follow" ), Qt::CaseInsensitive ) == 0 )
81 else if ( value.compare( QLatin1String(
"start" ), Qt::CaseInsensitive ) == 0 )
83 else if ( value.compare( QLatin1String(
"center" ), Qt::CaseInsensitive ) == 0 )
85 else if ( value.compare( QLatin1String(
"end" ), Qt::CaseInsensitive ) == 0 )
double valueAsDouble(int key, const QgsExpressionContext &context, double defaultValue=0.0, bool *ok=nullptr) const
Calculates the current value of the property with the specified key and interprets it as a double.
QString valueAsString(int key, const QgsExpressionContext &context, const QString &defaultString=QString(), bool *ok=nullptr) const
Calculates the current value of the property with the specified key and interprets it as a string.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
void setOriginalValueVariable(const QVariant &value)
Sets the original value variable value for the context.
@ Strict
Line anchor is a strict placement, and other placements are not permitted.
@ HintOnly
Line anchor is a hint for preferred placement only, but other placements close to the hint are permit...
@ UseEntireLine
Entire original feature line geometry is used when calculating the line anchor for labels.
@ UseVisiblePartsOfLine
Only visible parts of lines are considered when calculating the line anchor for labels.
@ EndOfText
Anchor using end of text.
@ StartOfText
Anchor using start of text.
@ CenterOfText
Anchor using center of text.
@ FollowPlacement
Automatically set the anchor point based on the lineAnchorPercent() value. Values <25% will use the s...
void updateDataDefinedProperties(const QgsPropertyCollection &properties, QgsExpressionContext &context)
Updates the thinning settings to respect any data defined properties set within the specified propert...
static QString encodeLinePlacementFlags(QgsLabeling::LinePlacementFlags flags)
Encodes line placement flags to a string.
static QgsLabeling::LinePlacementFlags decodeLinePlacementFlags(const QString &string)
Decodes a string to set of line placement flags.
@ OverrunDistance
Distance which labels can extend past either end of linear features.
@ LineAnchorPercent
Portion along line at which labels should be anchored (since QGIS 3.16)
@ LineAnchorType
Line anchor type (since QGIS 3.26)
@ LineAnchorClipping
Clipping mode for line anchor calculation (since QGIS 3.20)
@ LineAnchorTextPoint
Line anchor text point (since QGIS 3.26)
@ LinePlacementOptions
Line placement flags.
A grouped map of multiple QgsProperty objects, each referenced by a integer key value.
bool isActive(int key) const override
Returns true if the collection contains an active property with the specified key.