Single scope for storing variables and functions for use within a QgsExpressionContext.
void setOriginalValueVariable(const QVariant &value)
Sets the original value variable value for the context.
Contains information about the context of a rendering operation.
double convertToPainterUnits(double size, Qgis::RenderUnit unit, const QgsMapUnitScale &scale=QgsMapUnitScale(), Qgis::RenderSubcomponentProperty property=Qgis::RenderSubcomponentProperty::Generic) const
Converts a size from the specified units to painter units (pixels).
QgsExpressionContext & expressionContext()
Gets the expression context.
~QgsSymbolRenderContext()
void setExpressionContextScope(QgsExpressionContextScope *contextScope)
Set an expression scope for this symbol.
QgsSymbolRenderContext & operator=(const QgsSymbolRenderContext &)
Q_DECL_DEPRECATED double outputLineWidth(double width) const
Q_DECL_DEPRECATED double outputPixelSize(double size) const
QgsSymbolRenderContext(QgsRenderContext &c, Qgis::RenderUnit u, qreal opacity=1.0, bool selected=false, Qgis::SymbolRenderHints renderHints=Qgis::SymbolRenderHints(), const QgsFeature *f=nullptr, const QgsFields &fields=QgsFields(), const QgsMapUnitScale &mapUnitScale=QgsMapUnitScale())
Constructor for QgsSymbolRenderContext.
void setOriginalValueVariable(const QVariant &value)
Sets the original value variable value for data defined symbology.
void setPatchShape(const QgsLegendPatchShape &shape)
Sets the symbol patch shape, to use if rendering symbol preview icons.
QgsExpressionContextScope * expressionContextScope()
This scope is always available when a symbol of this type is being rendered.
const QgsLegendPatchShape * patchShape() const
Returns the symbol patch shape, to use if rendering symbol preview icons.