Class: QgsArrowSymbolLayer¶
-
class
qgis.core.
QgsArrowSymbolLayer
¶ Bases:
QgsLineSymbolLayer
Simple constructor
Line symbol layer used for representing lines as arrows.
Methods
Gets current arrow start width.
Gets the unit for the arrow start width
Gets the scale for the arrow start width
Gets the current arrow type
Gets current arrow width
Gets the unit for the arrow width
Gets the scale for the arrow width
- rtype
QgsArrowSymbolLayer
- rtype
QColor
Copies all data defined properties of this layer to another symbol layer.
Copies paint effect of this layer to another symbol layer
Create a new QgsArrowSymbolLayer
- rtype
bool
Gets the current arrow head length
Gets the unit for the head length
Gets the scale for the head length
Gets the current arrow head height
Gets the unit for the head height
Gets the scale for the head height
Gets the current head type
Returns whether it is a curved arrow or a straight one
Returns whether the arrow is repeated along the line or not
- rtype
str
- rtype
Dict[str, str]
- param points
Restores older data defined properties from string map.
Sets the arrow start width
Sets the unit for the arrow start width
Sets the scale for the arrow start width
Sets the arrow type
Sets the arrow width
Sets the unit for the arrow width
Sets the scale for the arrow width
- param c
Sets the arrow head length
Sets the unit for the head length
Sets the scale for the head length
Sets the arrow head height
Sets the unit for the head height
Sets the scale for the head height
Sets the head type
Sets whether it is a curved arrow or a straight one
Sets whether the arrow is repeated along the line
- param symbol
- param context
- param context
- rtype
QgsSymbol
- param context
Attributes
-
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
-
arrowStartWidthUnitScale
(self) → QgsMapUnitScale¶ Gets the scale for the arrow start width
- Return type
-
arrowType
(self) → QgsArrowSymbolLayer.ArrowType¶ Gets the current arrow type
- Return type
-
arrowWidth
(self) → float¶ Gets current arrow width
- Return type
float
-
arrowWidthUnit
(self) → QgsUnitTypes.RenderUnit¶ Gets the unit for the arrow width
- Return type
-
arrowWidthUnitScale
(self) → QgsMapUnitScale¶ Gets the scale for the arrow width
- Return type
-
clone
(self) → QgsArrowSymbolLayer¶ - Return type
-
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, str] = {}) → QgsSymbolLayer¶ Create a new QgsArrowSymbolLayer
- Parameters
properties (Dict[str) – A property map to deserialize saved information from properties()
- Return type
- 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
-
headLengthUnitScale
(self) → QgsMapUnitScale¶ Gets the scale for the head length
- Return type
-
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
-
headThicknessUnitScale
(self) → QgsMapUnitScale¶ Gets the scale for the head height
- Return type
-
headType
(self) → QgsArrowSymbolLayer.HeadType¶ Gets the current head type
- Return type
-
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, str]¶ - Return type
Dict[str, str]
-
renderPolyline
(self, points: QPolygonF, context: QgsSymbolRenderContext)¶ - Parameters
points (QPolygonF) –
context (QgsSymbolRenderContext) –
-
restoreOldDataDefinedProperties
(self, stringMap: Dict[str, str])¶ 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])¶ - 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) –
-
startRender
(self, context: QgsSymbolRenderContext)¶ - Parameters
context (QgsSymbolRenderContext) –
-
stopRender
(self, context: QgsSymbolRenderContext)¶ - Parameters
context (QgsSymbolRenderContext) –
-
usedAttributes
(self, context: QgsRenderContext) → Set[str]¶ - Parameters
context (QgsRenderContext) –
- Return type
Set[str]