Class: QgsLayoutItemPolyline

class qgis.core.QgsLayoutItemPolyline(layout: QgsLayout)

Bases: qgis._core.QgsLayoutNodesItem

Constructor for QgsLayoutItemPolyline for the specified layout.

QgsLayoutItemPolyline(polyline: QPolygonF, layout: QgsLayout) Constructor for QgsLayoutItemPolyline for the specified polyline and layout.

Layout item for node based polyline shapes.

New in version 3.0: Enums

Methods

accept

adjustPointForReferencePosition

applyDataDefinedSize

applyItemSizeConstraint

arrowHeadFillColor

Returns the color used to fill the arrow head.

arrowHeadStrokeColor

Returns the color used to draw the stroke around the the arrow head.

arrowHeadStrokeWidth

Returns the pen width in millimeters for the stroke of the arrow head.

arrowHeadWidth

Returns the width of line arrow heads in mm.

childEvent

computeDistance

connectNotify

contextMenuEvent

create

Returns a new polyline item for the specified layout.

customEvent

disconnectNotify

displayName

dragEnterEvent

dragLeaveEvent

dragMoveEvent

draw

drawBackground

drawDebugRect

drawFrame

dropEvent

endMarker

Returns the end marker mode, which controls what marker is drawn at the end of the line.

endSvgMarkerPath

Returns the path the an SVG marker drawn at the end of the line.

focusInEvent

focusOutEvent

hoverEnterEvent

hoverLeaveEvent

hoverMoveEvent

icon

inputMethodEvent

inputMethodQuery

isSignalConnected

itemChange

keyPressEvent

keyReleaseEvent

mouseDoubleClickEvent

mouseMoveEvent

mousePressEvent

mouseReleaseEvent

positionAtReferencePoint

prepareGeometryChange

readObjectPropertiesFromElement

readPropertiesFromElement

receivers

refreshBackgroundColor

refreshBlendMode

refreshFrame

refreshItemPosition

refreshItemRotation

refreshItemSize

refreshOpacity

rescaleToFitBoundingBox

sceneEvent

sceneEventFilter

sender

senderSignalIndex

setArrowHeadFillColor

Sets the color used to fill the arrow head.

setArrowHeadStrokeColor

Sets the color used to draw the stroke around the arrow head.

setArrowHeadStrokeWidth

Sets the pen width in millimeters for the stroke of the arrow head

setArrowHeadWidth

Sets the width of line arrow heads in mm.

setEndMarker

Sets the end marker mode, which controls what marker is drawn at the end of the line.

setEndSvgMarkerPath

Sets the path to a SVG marker to draw at the end of the line.

setFixedSize

setMinimumSize

setStartMarker

Sets the start marker mode, which controls what marker is drawn at the start of the line.

setStartSvgMarkerPath

Sets the path to a SVG marker to draw at the start of the line.

setSymbol

Sets the symbol used to draw the shape.

shape

startMarker

Returns the start marker mode, which controls what marker is drawn at the start of the line.

startSvgMarkerPath

Returns the path the an SVG marker drawn at the start of the line.

symbol

Returns the line symbol used to draw the shape.

timerEvent

topLeftToReferencePoint

type

updateBoundingRect

updateMicroFocus

updateSceneRect

wheelEvent

writeObjectPropertiesToElement

writePropertiesToElement

Signals

Attributes

ArrowHead

NoMarker

SvgMarker

ArrowHead = 1
class MarkerMode

Bases: int

NoMarker = 0
SvgMarker = 2
accept(self, visitor: QgsStyleEntityVisitorInterface) → bool
adjustPointForReferencePosition()
applyDataDefinedSize()
applyItemSizeConstraint()
arrowHeadFillColor(self) → QColor

Returns the color used to fill the arrow head.

arrowHeadStrokeColor(self) → QColor

Returns the color used to draw the stroke around the the arrow head.

arrowHeadStrokeWidth(self) → float

Returns the pen width in millimeters for the stroke of the arrow head.

arrowHeadWidth(self) → float

Returns the width of line arrow heads in mm.

childEvent()
computeDistance()
connectNotify()
contextMenuEvent()
create(layout: QgsLayout) → QgsLayoutItemPolyline

Returns a new polyline item for the specified layout.

The caller takes responsibility for deleting the returned object.

customEvent()
disconnectNotify()
displayName(self) → str
dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
draw()
drawBackground()
drawDebugRect()
drawFrame()
dropEvent()
endMarker(self) → QgsLayoutItemPolyline.MarkerMode

Returns the end marker mode, which controls what marker is drawn at the end of the line.

See also

setEndMarker()

See also

startMarker()

endSvgMarkerPath(self) → str

Returns the path the an SVG marker drawn at the end of the line.

focusInEvent()
focusOutEvent()
hoverEnterEvent()
hoverLeaveEvent()
hoverMoveEvent()
icon(self) → QIcon
inputMethodEvent()
inputMethodQuery()
isSignalConnected()
itemChange()
keyPressEvent()
keyReleaseEvent()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
positionAtReferencePoint()
prepareGeometryChange()
readObjectPropertiesFromElement()
readPropertiesFromElement(self, element: QDomElement, document: QDomDocument, context: QgsReadWriteContext) → bool
receivers()
refreshBackgroundColor()
refreshBlendMode()
refreshFrame()
refreshItemPosition()
refreshItemRotation()
refreshItemSize()
refreshOpacity()
rescaleToFitBoundingBox()
sceneEvent()
sceneEventFilter()
sender()
senderSignalIndex()
setArrowHeadFillColor(self, color: Union[QColor, Qt.GlobalColor])

Sets the color used to fill the arrow head.

setArrowHeadStrokeColor(self, color: Union[QColor, Qt.GlobalColor])

Sets the color used to draw the stroke around the arrow head.

setArrowHeadStrokeWidth(self, width: float)

Sets the pen width in millimeters for the stroke of the arrow head

setArrowHeadWidth(self, width: float)

Sets the width of line arrow heads in mm.

See also

arrowHeadWidth()

setEndMarker(self, mode: QgsLayoutItemPolyline.MarkerMode)

Sets the end marker mode, which controls what marker is drawn at the end of the line.

See also

endMarker()

See also

setStartMarker()

setEndSvgMarkerPath(self, path: str)

Sets the path to a SVG marker to draw at the end of the line.

setFixedSize()
setMinimumSize()
setStartMarker(self, mode: QgsLayoutItemPolyline.MarkerMode)

Sets the start marker mode, which controls what marker is drawn at the start of the line.

See also

startMarker()

See also

setEndMarker()

setStartSvgMarkerPath(self, path: str)

Sets the path to a SVG marker to draw at the start of the line.

setSymbol(self, symbol: QgsLineSymbol)

Sets the symbol used to draw the shape. Ownership of symbol is not transferred.

See also

symbol()

shape(self) → QPainterPath
startMarker(self) → QgsLayoutItemPolyline.MarkerMode

Returns the start marker mode, which controls what marker is drawn at the start of the line.

See also

setStartMarker()

See also

endMarker()

startSvgMarkerPath(self) → str

Returns the path the an SVG marker drawn at the start of the line.

symbol(self) → QgsLineSymbol

Returns the line symbol used to draw the shape.

See also

setSymbol()

timerEvent()
topLeftToReferencePoint()
type(self) → int
updateBoundingRect(self)
updateMicroFocus()
updateSceneRect()
wheelEvent()
writeObjectPropertiesToElement()
writePropertiesToElement(self, element: QDomElement, document: QDomDocument, context: QgsReadWriteContext) → bool