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: Enums

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)
isOnUserDefinedGrid Returns whether vectors are drawn on user-defined grid
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)
setOnUserDefinedGrid Toggles drawing of vectors on user defined grid
setScaleFactor Sets scale factor
setShaftLengthMethod Sets method used for drawing arrows
setUserGridCellHeight Sets height of user grid cell (in pixels)
setUserGridCellWidth Sets width of user grid cell (in pixels)
shaftLengthMethod Returns method used for drawing arrows
userGridCellHeight Returns height in pixels of user grid cell
userGridCellWidth Returns width in pixels of user grid cell
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

isOnUserDefinedGrid(self) → bool

Returns whether vectors are drawn on user-defined grid

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

setOnUserDefinedGrid(self, enabled: bool)

Toggles drawing of vectors on user defined grid

setScaleFactor(self, scaleFactor: float)

Sets scale factor

Only for QgsMeshRendererVectorSettings.ArrowScalingMethod.Scaled

setShaftLengthMethod(self, shaftLengthMethod: QgsMeshRendererVectorSettings.ArrowScalingMethod)

Sets method used for drawing arrows

setUserGridCellHeight(self, height: int)

Sets height of user grid cell (in pixels)

setUserGridCellWidth(self, width: int)

Sets width of user grid cell (in pixels)

shaftLengthMethod(self) → QgsMeshRendererVectorSettings.ArrowScalingMethod

Returns method used for drawing arrows

userGridCellHeight(self) → int

Returns height in pixels of user grid cell

userGridCellWidth(self) → int

Returns width in pixels of user grid cell

writeXml(self, doc: QDomDocument) → QDomElement

Writes configuration to a new DOM element