Subgroup: Mesh

Class: QgsMeshRendererVectorSettings

class qgis.core.QgsMeshRendererVectorSettings

Bases: sip.wrapper

Represents a mesh renderer settings for vector datasets

Note

The API is considered EXPERIMENTAL and can be changed without a notice

New in version 3.2: Methods

arrowHeadLengthRatio Returns ratio of the head length of the arrow (range 0-1)
arrowHeadWidthRatio Returns ratio of the head width of the arrow (range 0-1)
color Returns color used for drawing arrows
filterMax Returns filter value for vector magnitudes.
filterMin Returns filter value for vector magnitudes.
fixedShaftLength Returns fixed arrow length (in millimeters)
lineWidth Returns line width of the arrow (in millimeters)
maxShaftLength Returns maximum shaft length (in millimeters)
minShaftLength Returns mininimum shaft length (in millimeters)
readXml Reads configuration from the given DOM element
scaleFactor Returns scale factor
setArrowHeadLengthRatio Sets ratio of the head length of the arrow (range 0-1)
setArrowHeadWidthRatio Sets ratio of the head width of the arrow (range 0-1)
setColor Sets color used for drawing arrows
setFilterMax Sets filter value for vector magnitudes.
setFilterMin Sets filter value for vector magnitudes.
setFixedShaftLength Sets fixed length (in millimeters)
setLineWidth Sets line width of the arrow in pixels (in millimeters)
setMaxShaftLength Sets maximum shaft length (in millimeters)
setMinShaftLength Sets mininimum shaft length (in millimeters)
setScaleFactor Sets scale factor
setShaftLengthMethod Sets method used for drawing arrows
shaftLengthMethod Returns method used for drawing arrows
writeXml Writes configuration to a new DOM element

Signals

Attributes

Fixed
MinMax
Scaled
class ArrowScalingMethod

Bases: int

Fixed = 2
MinMax = 0
Scaled = 1
arrowHeadLengthRatio(self) → float

Returns ratio of the head length of the arrow (range 0-1)

arrowHeadWidthRatio(self) → float

Returns ratio of the head width of the arrow (range 0-1)

color(self) → QColor

Returns color used for drawing arrows

filterMax(self) → float

Returns filter value for vector magnitudes.

If magnitude of the vector is higher than this value, the vector is not drawn. -1 represents that filtering is not active.

filterMin(self) → float

Returns filter value for vector magnitudes.

If magnitude of the vector is lower than this value, the vector is not drawn. -1 represents that filtering is not active.

fixedShaftLength(self) → float

Returns fixed arrow length (in millimeters)

Only for QgsMeshRendererVectorSettings.ArrowScalingMethod.Fixed

lineWidth(self) → float

Returns line width of the arrow (in millimeters)

maxShaftLength(self) → float

Returns maximum shaft length (in millimeters)

Only for QgsMeshRendererVectorSettings.ArrowScalingMethod.MinMax

minShaftLength(self) → float

Returns mininimum shaft length (in millimeters)

Only for QgsMeshRendererVectorSettings.ArrowScalingMethod.MinMax

readXml(self, elem: QDomElement)

Reads configuration from the given DOM element

scaleFactor(self) → float

Returns scale factor

Only for QgsMeshRendererVectorSettings.ArrowScalingMethod.Scaled

setArrowHeadLengthRatio(self, arrowHeadLengthRatio: float)

Sets ratio of the head length of the arrow (range 0-1)

setArrowHeadWidthRatio(self, arrowHeadWidthRatio: float)

Sets ratio of the head width of the arrow (range 0-1)

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

Sets color used for drawing arrows

setFilterMax(self, filterMax: float)

Sets filter value for vector magnitudes.

See also

filterMax()

setFilterMin(self, filterMin: float)

Sets filter value for vector magnitudes.

See also

filterMin()

setFixedShaftLength(self, fixedShaftLength: float)

Sets fixed length (in millimeters)

Only for QgsMeshRendererVectorSettings.ArrowScalingMethod.Fixed

setLineWidth(self, lineWidth: float)

Sets line width of the arrow in pixels (in millimeters)

setMaxShaftLength(self, maxShaftLength: float)

Sets maximum shaft length (in millimeters)

Only for QgsMeshRendererVectorSettings.ArrowScalingMethod.MinMax

setMinShaftLength(self, minShaftLength: float)

Sets mininimum shaft length (in millimeters)

Only for QgsMeshRendererVectorSettings.ArrowScalingMethod.MinMax

setScaleFactor(self, scaleFactor: float)

Sets scale factor

Only for QgsMeshRendererVectorSettings.ArrowScalingMethod.Scaled

setShaftLengthMethod(self, shaftLengthMethod: QgsMeshRendererVectorSettings.ArrowScalingMethod)

Sets method used for drawing arrows

shaftLengthMethod(self) → QgsMeshRendererVectorSettings.ArrowScalingMethod

Returns method used for drawing arrows

writeXml(self, doc: QDomDocument) → QDomElement

Writes configuration to a new DOM element