Class: QgsLayoutItemPolyline¶
Layout item for node based polyline shapes.
Class Hierarchy¶
Base classes¶
An abstract layout item that provides generic methods for node based shapes such as polygon or polylines. |
|
Base class for graphical items within a |
|
A base class for objects which belong to a layout. |
|
Abstract interface for generating an expression context. |
|
Interface for layout objects which support undo/redo commands. |
Methods
Returns the color used to fill the arrow head. |
|
Returns the color used to draw the stroke around the the arrow head. |
|
Returns the pen width in millimeters for the stroke of the arrow head. |
|
Returns the width of line arrow heads in mm. |
|
Returns the end marker mode, which controls what marker is drawn at the end of the line. |
|
Returns the path the an SVG marker drawn at the end of the line. |
|
Sets the color used to fill the arrow head. |
|
Sets the color used to draw the stroke around the arrow head. |
|
Sets the pen width in millimeters for the stroke of the arrow head |
|
Sets the width of line arrow heads in mm. |
|
Sets the end marker mode, which controls what marker is drawn at the end of the line. |
|
Sets the path to a SVG marker to draw at the end of the line. |
|
Sets the start marker mode, which controls what marker is drawn at the start of the line. |
|
Sets the path to a SVG marker to draw at the start of the line. |
|
Sets the symbol used to draw the shape. |
|
Returns the start marker mode, which controls what marker is drawn at the start of the line. |
|
Returns the path the an SVG marker drawn at the start of the line. |
|
Returns the line symbol used to draw the shape. |
Static Methods
Returns a new polyline item for the specified layout. |
Attributes
- class qgis.core.QgsLayoutItemPolyline[source]¶
Bases:
QgsLayoutNodesItem
- __init__(layout: QgsLayout | None)
Constructor for QgsLayoutItemPolyline for the specified
layout
.- Parameters:
layout (Optional[QgsLayout])
- __init__(polyline: QPolygonF, layout: QgsLayout | None)
Constructor for QgsLayoutItemPolyline for the specified
polyline
andlayout
.- Parameters:
polyline (QPolygonF)
layout (Optional[QgsLayout])
- ArrowHead = 1¶
- class MarkerMode¶
Bases:
int
- NoMarker = 0¶
- SvgMarker = 2¶
- arrowHeadFillColor(self) QColor [source]¶
Returns the color used to fill the arrow head.
See also
See also
- Return type:
QColor
- arrowHeadStrokeColor(self) QColor [source]¶
Returns the color used to draw the stroke around the the arrow head.
See also
See also
- Return type:
QColor
- arrowHeadStrokeWidth(self) float [source]¶
Returns the pen width in millimeters for the stroke of the arrow head.
See also
See also
- Return type:
float
- arrowHeadWidth(self) float [source]¶
Returns the width of line arrow heads in mm.
See also
- Return type:
float
- static create(layout: QgsLayout | None) QgsLayoutItemPolyline | None [source]¶
Returns a new polyline item for the specified
layout
.The caller takes responsibility for deleting the returned object.
- Parameters:
layout (Optional[QgsLayout])
- Return type:
Optional[QgsLayoutItemPolyline]
- endMarker(self) QgsLayoutItemPolyline.MarkerMode [source]¶
Returns the end marker mode, which controls what marker is drawn at the end of the line.
See also
See also
- Return type:
- endSvgMarkerPath(self) str [source]¶
Returns the path the an SVG marker drawn at the end of the line.
See also
See also
- Return type:
str
- setArrowHeadFillColor(self, color: QColor | Qt.GlobalColor)[source]¶
Sets the
color
used to fill the arrow head.See also
See also
- Parameters:
color (Union[QColor, Qt.GlobalColor])
- setArrowHeadStrokeColor(self, color: QColor | Qt.GlobalColor)[source]¶
Sets the
color
used to draw the stroke around the arrow head.See also
See also
- Parameters:
color (Union[QColor, Qt.GlobalColor])
- setArrowHeadStrokeWidth(self, width: float)[source]¶
Sets the pen
width
in millimeters for the stroke of the arrow headSee also
See also
- Parameters:
width (float)
- setArrowHeadWidth(self, width: float)[source]¶
Sets the
width
of line arrow heads in mm.See also
- Parameters:
width (float)
- setEndMarker(self, mode: QgsLayoutItemPolyline.MarkerMode)[source]¶
Sets the end marker
mode
, which controls what marker is drawn at the end of the line.See also
See also
- Parameters:
- setEndSvgMarkerPath(self, path: str | None)[source]¶
Sets the
path
to a SVG marker to draw at the end of the line.See also
See also
- Parameters:
path (Optional[str])
- setStartMarker(self, mode: QgsLayoutItemPolyline.MarkerMode)[source]¶
Sets the start marker
mode
, which controls what marker is drawn at the start of the line.See also
See also
- Parameters:
- setStartSvgMarkerPath(self, path: str | None)[source]¶
Sets the
path
to a SVG marker to draw at the start of the line.See also
See also
- Parameters:
path (Optional[str])
- setSymbol(self, symbol: QgsLineSymbol | None)[source]¶
Sets the
symbol
used to draw the shape. Ownership ofsymbol
is not transferred.See also
- Parameters:
symbol (Optional[QgsLineSymbol])
- startMarker(self) QgsLayoutItemPolyline.MarkerMode [source]¶
Returns the start marker mode, which controls what marker is drawn at the start of the line.
See also
See also
- Return type:
- startSvgMarkerPath(self) str [source]¶
Returns the path the an SVG marker drawn at the start of the line.
See also
See also
- Return type:
str
- symbol(self) QgsLineSymbol | None [source]¶
Returns the line symbol used to draw the shape.
See also
- Return type:
Optional[QgsLineSymbol]