Class: QgsSimpleLineCallout

class qgis.core.QgsSimpleLineCallout

Bases: qgis._core.QgsCallout

A simple direct line callout style.

New in version 3.10: Enums

Methods

clone

create

Creates a new QgsSimpleLineCallout, using the settings serialized in the properties map (corresponding to the output from QgsSimpleLineCallout.properties() ).

draw

drawCalloutToAllParts

Returns True if callout lines should be drawn to all feature parts.

lineSymbol

Returns the line symbol used to render the callout line.

minimumLength

Returns the minimum length of callout lines.

minimumLengthMapUnitScale

Returns the map unit scale for the minimum callout length.

minimumLengthUnit

Returns the units for the minimum length of callout lines.

offsetFromAnchor

Returns the offset distance from the anchor point at which to start the line.

offsetFromAnchorMapUnitScale

Returns the map unit scale for the offset from anchor.

offsetFromAnchorUnit

Returns the units for the offset from anchor point.

offsetFromLabel

Returns the offset distance from label area at which to end the line.

offsetFromLabelMapUnitScale

Returns the map unit scale for the minimum callout length.

offsetFromLabelUnit

Returns the units for the offset from label area.

properties

readProperties

referencedFields

setDrawCalloutToAllParts

Sets whether callout lines should be drawn to all feature parts.

setLineSymbol

Sets the line symbol used to render the callout line.

setMinimumLength

Sets the minimum length of callout lines.

setMinimumLengthMapUnitScale

Sets the map unit scale for the minimum callout length.

setMinimumLengthUnit

Sets the unit for the minimum length of callout lines.

setOffsetFromAnchor

Sets the offset distance from the anchor point at which to start the line.

setOffsetFromAnchorMapUnitScale

Sets the map unit scale for the offset from anchor.

setOffsetFromAnchorUnit

Sets the unit for the offset from anchor distance.

setOffsetFromLabel

Sets the offset distance from label area at which to end the line.

setOffsetFromLabelMapUnitScale

Sets the map unit scale for the offset from label area.

setOffsetFromLabelUnit

Sets the unit for the offset from label area distance.

startRender

stopRender

type

Signals

Attributes

clone(self) → QgsSimpleLineCallout
create(properties: Dict[str, Any] = {}, context: QgsReadWriteContext = QgsReadWriteContext()) → QgsCallout

Creates a new QgsSimpleLineCallout, using the settings serialized in the properties map (corresponding to the output from QgsSimpleLineCallout.properties() ).

draw(self, context: QgsRenderContext, bodyBoundingBox: QRectF, angle: float, anchor: QgsGeometry, calloutContext: QgsCallout.QgsCalloutContext)
drawCalloutToAllParts(self) → bool

Returns True if callout lines should be drawn to all feature parts.

lineSymbol(self) → QgsLineSymbol

Returns the line symbol used to render the callout line.

Ownership is not transferred.

See also

setLineSymbol()

minimumLength(self) → float

Returns the minimum length of callout lines. Units are specified through minimumLengthUnits().

minimumLengthMapUnitScale(self) → QgsMapUnitScale

Returns the map unit scale for the minimum callout length.

See also

minimumLength()

minimumLengthUnit(self) → QgsUnitTypes.RenderUnit

Returns the units for the minimum length of callout lines.

See also

minimumLength()

offsetFromAnchor(self) → float

Returns the offset distance from the anchor point at which to start the line. Units are specified through offsetFromAnchorUnit().

offsetFromAnchorMapUnitScale(self) → QgsMapUnitScale

Returns the map unit scale for the offset from anchor.

offsetFromAnchorUnit(self) → QgsUnitTypes.RenderUnit

Returns the units for the offset from anchor point.

offsetFromLabel(self) → float

Returns the offset distance from label area at which to end the line. Units are specified through offsetFromLabelUnit().

offsetFromLabelMapUnitScale(self) → QgsMapUnitScale

Returns the map unit scale for the minimum callout length.

offsetFromLabelUnit(self) → QgsUnitTypes.RenderUnit

Returns the units for the offset from label area.

properties(self, context: QgsReadWriteContext) → Dict[str, Any]
readProperties(self, props: Dict[str, Any], context: QgsReadWriteContext)
referencedFields(self, context: QgsRenderContext) → Set[str]
setDrawCalloutToAllParts(self, drawToAllParts: bool)

Sets whether callout lines should be drawn to all feature parts.

setLineSymbol(self, symbol: QgsLineSymbol)

Sets the line symbol used to render the callout line. Ownership of symbol is transferred to the callout.

See also

lineSymbol()

setMinimumLength(self, length: float)

Sets the minimum length of callout lines. Units are specified through setMinimumLengthUnit().

See also

minimumLength()

setMinimumLengthMapUnitScale(self, scale: QgsMapUnitScale)

Sets the map unit scale for the minimum callout length.

setMinimumLengthUnit(self, unit: QgsUnitTypes.RenderUnit)

Sets the unit for the minimum length of callout lines.

setOffsetFromAnchor(self, distance: float)

Sets the offset distance from the anchor point at which to start the line. Units are specified through setOffsetFromAnchorUnit().

setOffsetFromAnchorMapUnitScale(self, scale: QgsMapUnitScale)

Sets the map unit scale for the offset from anchor.

setOffsetFromAnchorUnit(self, unit: QgsUnitTypes.RenderUnit)

Sets the unit for the offset from anchor distance.

setOffsetFromLabel(self, distance: float)

Sets the offset distance from label area at which to end the line. Units are specified through setOffsetFromLabelUnit().

setOffsetFromLabelMapUnitScale(self, scale: QgsMapUnitScale)

Sets the map unit scale for the offset from label area.

setOffsetFromLabelUnit(self, unit: QgsUnitTypes.RenderUnit)

Sets the unit for the offset from label area distance.

startRender(self, context: QgsRenderContext)
stopRender(self, context: QgsRenderContext)
type(self) → str