Class: QgsArrowSymbolLayer

class qgis.core.QgsArrowSymbolLayer

Bases: QgsLineSymbolLayer

Line symbol layer used for representing lines as arrows.

New in version 2.16.

QgsArrowSymbolLayer() Simple constructor

Methods

arrowStartWidth

Gets current arrow start width.

arrowStartWidthUnit

Gets the unit for the arrow start width

arrowStartWidthUnitScale

Gets the scale for the arrow start width

arrowType

Gets the current arrow type

arrowWidth

Gets current arrow width

arrowWidthUnit

Gets the unit for the arrow width

arrowWidthUnitScale

Gets the scale for the arrow width

canCauseArtifactsBetweenAdjacentTiles

rtype

bool

clone

rtype

QgsArrowSymbolLayer

color

rtype

QColor

copyDataDefinedProperties

Copies all data defined properties of this layer to another symbol layer.

copyPaintEffect

Copies paint effect of this layer to another symbol layer

create

Create a new QgsArrowSymbolLayer

hasDataDefinedProperties

rtype

bool

headLength

Gets the current arrow head length

headLengthUnit

Gets the unit for the head length

headLengthUnitScale

Gets the scale for the head length

headThickness

Gets the current arrow head height

headThicknessUnit

Gets the unit for the head height

headThicknessUnitScale

Gets the scale for the head height

headType

Gets the current head type

isCurved

Returns whether it is a curved arrow or a straight one

isRepeated

Returns whether the arrow is repeated along the line or not

layerType

rtype

str

properties

rtype

Dict[str, Any]

renderPolyline

param points

restoreOldDataDefinedProperties

Restores older data defined properties from string map.

setArrowStartWidth

Sets the arrow start width

setArrowStartWidthUnit

Sets the unit for the arrow start width

setArrowStartWidthUnitScale

Sets the scale for the arrow start width

setArrowType

Sets the arrow type

setArrowWidth

Sets the arrow width

setArrowWidthUnit

Sets the unit for the arrow width

setArrowWidthUnitScale

Sets the scale for the arrow width

setColor

param c

setHeadLength

Sets the arrow head length

setHeadLengthUnit

Sets the unit for the head length

setHeadLengthUnitScale

Sets the scale for the head length

setHeadThickness

Sets the arrow head height

setHeadThicknessUnit

Sets the unit for the head height

setHeadThicknessUnitScale

Sets the scale for the head height

setHeadType

Sets the head type

setIsCurved

Sets whether it is a curved arrow or a straight one

setIsRepeated

Sets whether the arrow is repeated along the line

setSubSymbol

param symbol

startRender

param context

stopRender

param context

subSymbol

rtype

QgsSymbol

usedAttributes

param context

usesMapUnits

rtype

bool

Attributes

ArrowLeftHalf

ArrowPlain

ArrowRightHalf

HeadDouble

HeadReversed

HeadSingle

ArrowLeftHalf = 1
ArrowPlain = 0
ArrowRightHalf = 2
class ArrowType

Bases: int

HeadDouble = 2
HeadReversed = 1
HeadSingle = 0
class HeadType

Bases: int

arrowStartWidth(self) float

Gets current arrow start width. Only meaningful for single headed arrows

Return type

float

arrowStartWidthUnit(self) QgsUnitTypes.RenderUnit

Gets the unit for the arrow start width

Return type

QgsUnitTypes.RenderUnit

arrowStartWidthUnitScale(self) QgsMapUnitScale

Gets the scale for the arrow start width

Return type

QgsMapUnitScale

arrowType(self) QgsArrowSymbolLayer.ArrowType

Gets the current arrow type

Return type

QgsArrowSymbolLayer.ArrowType

arrowWidth(self) float

Gets current arrow width

Return type

float

arrowWidthUnit(self) QgsUnitTypes.RenderUnit

Gets the unit for the arrow width

Return type

QgsUnitTypes.RenderUnit

arrowWidthUnitScale(self) QgsMapUnitScale

Gets the scale for the arrow width

Return type

QgsMapUnitScale

canCauseArtifactsBetweenAdjacentTiles(self) bool
Return type

bool

clone(self) QgsArrowSymbolLayer
Return type

QgsArrowSymbolLayer

color(self) QColor
Return type

QColor

copyDataDefinedProperties(self, destLayer: QgsSymbolLayer)

Copies all data defined properties of this layer to another symbol layer.

Parameters

destLayer – destination layer

copyPaintEffect(self, destLayer: QgsSymbolLayer)

Copies paint effect of this layer to another symbol layer

Parameters

destLayer – destination layer

New in version 2.9.

create(properties: Dict[str, Any] = {}) QgsSymbolLayer

Create a new QgsArrowSymbolLayer

Parameters

properties (Dict[str) – A property map to deserialize saved information from properties()

Return type

QgsSymbolLayer

Returns

A new QgsArrowSymbolLayer

hasDataDefinedProperties(self) bool
Return type

bool

headLength(self) float

Gets the current arrow head length

Return type

float

headLengthUnit(self) QgsUnitTypes.RenderUnit

Gets the unit for the head length

Return type

QgsUnitTypes.RenderUnit

headLengthUnitScale(self) QgsMapUnitScale

Gets the scale for the head length

Return type

QgsMapUnitScale

headThickness(self) float

Gets the current arrow head height

Return type

float

headThicknessUnit(self) QgsUnitTypes.RenderUnit

Gets the unit for the head height

Return type

QgsUnitTypes.RenderUnit

headThicknessUnitScale(self) QgsMapUnitScale

Gets the scale for the head height

Return type

QgsMapUnitScale

headType(self) QgsArrowSymbolLayer.HeadType

Gets the current head type

Return type

QgsArrowSymbolLayer.HeadType

isCurved(self) bool

Returns whether it is a curved arrow or a straight one

Return type

bool

isRepeated(self) bool

Returns whether the arrow is repeated along the line or not

Return type

bool

layerType(self) str
Return type

str

properties(self) Dict[str, Any]
Return type

Dict[str, Any]

renderPolyline(self, points: QPolygonF, context: QgsSymbolRenderContext)
Parameters
restoreOldDataDefinedProperties(self, stringMap: Dict[str, Any])

Restores older data defined properties from string map.

New in version 3.0.

setArrowStartWidth(self, width: float)

Sets the arrow start width

Parameters

width (float) –

setArrowStartWidthUnit(self, unit: QgsUnitTypes.RenderUnit)

Sets the unit for the arrow start width

Parameters

unit (QgsUnitTypes.RenderUnit) –

setArrowStartWidthUnitScale(self, scale: QgsMapUnitScale)

Sets the scale for the arrow start width

Parameters

scale (QgsMapUnitScale) –

setArrowType(self, type: QgsArrowSymbolLayer.ArrowType)

Sets the arrow type

Parameters

type (QgsArrowSymbolLayer.ArrowType) –

setArrowWidth(self, width: float)

Sets the arrow width

Parameters

width (float) –

setArrowWidthUnit(self, unit: QgsUnitTypes.RenderUnit)

Sets the unit for the arrow width

Parameters

unit (QgsUnitTypes.RenderUnit) –

setArrowWidthUnitScale(self, scale: QgsMapUnitScale)

Sets the scale for the arrow width

Parameters

scale (QgsMapUnitScale) –

setColor(self, c: Union[QColor, Qt.GlobalColor, QGradient])
Parameters

c (Union[QColor) –

setHeadLength(self, length: float)

Sets the arrow head length

Parameters

length (float) –

setHeadLengthUnit(self, unit: QgsUnitTypes.RenderUnit)

Sets the unit for the head length

Parameters

unit (QgsUnitTypes.RenderUnit) –

setHeadLengthUnitScale(self, scale: QgsMapUnitScale)

Sets the scale for the head length

Parameters

scale (QgsMapUnitScale) –

setHeadThickness(self, thickness: float)

Sets the arrow head height

Parameters

thickness (float) –

setHeadThicknessUnit(self, unit: QgsUnitTypes.RenderUnit)

Sets the unit for the head height

Parameters

unit (QgsUnitTypes.RenderUnit) –

setHeadThicknessUnitScale(self, scale: QgsMapUnitScale)

Sets the scale for the head height

Parameters

scale (QgsMapUnitScale) –

setHeadType(self, type: QgsArrowSymbolLayer.HeadType)

Sets the head type

Parameters

type (QgsArrowSymbolLayer.HeadType) –

setIsCurved(self, isCurved: bool)

Sets whether it is a curved arrow or a straight one

Parameters

isCurved (bool) –

setIsRepeated(self, isRepeated: bool)

Sets whether the arrow is repeated along the line

Parameters

isRepeated (bool) –

setSubSymbol(self, symbol: QgsSymbol) bool
Parameters

symbol (QgsSymbol) –

Return type

bool

startRender(self, context: QgsSymbolRenderContext)
Parameters

context (QgsSymbolRenderContext) –

stopRender(self, context: QgsSymbolRenderContext)
Parameters

context (QgsSymbolRenderContext) –

subSymbol(self) QgsSymbol
Return type

QgsSymbol

usedAttributes(self, context: QgsRenderContext) Set[str]
Parameters

context (QgsRenderContext) –

Return type

Set[str]

usesMapUnits(self) bool
Return type

bool