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
Methods
Returns ratio of the head length of the arrow (range 0-1)
Returns ratio of the head width of the arrow (range 0-1)
Returns color used for drawing arrows
Returns filter value for vector magnitudes.
Returns filter value for vector magnitudes.
Returns fixed arrow length (in millimeters)
Returns whether vectors are drawn on user-defined grid
Returns line width of the arrow (in millimeters)
Returns maximum shaft length (in millimeters)
Returns mininimum shaft length (in millimeters)
Reads configuration from the given DOM element
Returns scale factor
Sets ratio of the head length of the arrow (range 0-1)
Sets ratio of the head width of the arrow (range 0-1)
Sets color used for drawing arrows
Sets filter value for vector magnitudes.
Sets filter value for vector magnitudes.
Sets fixed length (in millimeters)
Sets line width of the arrow in pixels (in millimeters)
Sets maximum shaft length (in millimeters)
Sets mininimum shaft length (in millimeters)
Toggles drawing of vectors on user defined grid
Sets scale factor
Sets method used for drawing arrows
Sets height of user grid cell (in pixels)
Sets width of user grid cell (in pixels)
Returns method used for drawing arrows
Returns height in pixels of user grid cell
Returns width in pixels of user grid cell
Writes configuration to a new DOM element
Attributes
-
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)
- Return type
float
-
arrowHeadWidthRatio
(self) → float¶ Returns ratio of the head width of the arrow (range 0-1)
- Return type
float
-
color
(self) → QColor¶ Returns color used for drawing arrows
- Return type
QColor
-
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.
- Return type
float
-
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.
- Return type
float
-
fixedShaftLength
(self) → float¶ Returns fixed arrow length (in millimeters)
Only for QgsMeshRendererVectorSettings.ArrowScalingMethod.Fixed
- Return type
float
-
isOnUserDefinedGrid
(self) → bool¶ Returns whether vectors are drawn on user-defined grid
- Return type
bool
-
lineWidth
(self) → float¶ Returns line width of the arrow (in millimeters)
- Return type
float
-
maxShaftLength
(self) → float¶ Returns maximum shaft length (in millimeters)
Only for QgsMeshRendererVectorSettings.ArrowScalingMethod.MinMax
- Return type
float
-
minShaftLength
(self) → float¶ Returns mininimum shaft length (in millimeters)
Only for QgsMeshRendererVectorSettings.ArrowScalingMethod.MinMax
- Return type
float
-
readXml
(self, elem: QDomElement)¶ Reads configuration from the given DOM element
- Parameters
elem (QDomElement) –
-
scaleFactor
(self) → float¶ Returns scale factor
Only for QgsMeshRendererVectorSettings.ArrowScalingMethod.Scaled
- Return type
float
-
setArrowHeadLengthRatio
(self, arrowHeadLengthRatio: float)¶ Sets ratio of the head length of the arrow (range 0-1)
- Parameters
arrowHeadLengthRatio (float) –
-
setArrowHeadWidthRatio
(self, arrowHeadWidthRatio: float)¶ Sets ratio of the head width of the arrow (range 0-1)
- Parameters
arrowHeadWidthRatio (float) –
-
setColor
(self, color: Union[QColor, Qt.GlobalColor, QGradient])¶ Sets color used for drawing arrows
- Parameters
color (Union[QColor) –
-
setFilterMax
(self, filterMax: float)¶ Sets filter value for vector magnitudes.
See also
- Parameters
filterMax (float) –
-
setFilterMin
(self, filterMin: float)¶ Sets filter value for vector magnitudes.
See also
- Parameters
filterMin (float) –
-
setFixedShaftLength
(self, fixedShaftLength: float)¶ Sets fixed length (in millimeters)
Only for QgsMeshRendererVectorSettings.ArrowScalingMethod.Fixed
- Parameters
fixedShaftLength (float) –
-
setLineWidth
(self, lineWidth: float)¶ Sets line width of the arrow in pixels (in millimeters)
- Parameters
lineWidth (float) –
-
setMaxShaftLength
(self, maxShaftLength: float)¶ Sets maximum shaft length (in millimeters)
Only for QgsMeshRendererVectorSettings.ArrowScalingMethod.MinMax
- Parameters
maxShaftLength (float) –
-
setMinShaftLength
(self, minShaftLength: float)¶ Sets mininimum shaft length (in millimeters)
Only for QgsMeshRendererVectorSettings.ArrowScalingMethod.MinMax
- Parameters
minShaftLength (float) –
-
setOnUserDefinedGrid
(self, enabled: bool)¶ Toggles drawing of vectors on user defined grid
- Parameters
enabled (bool) –
-
setScaleFactor
(self, scaleFactor: float)¶ Sets scale factor
Only for QgsMeshRendererVectorSettings.ArrowScalingMethod.Scaled
- Parameters
scaleFactor (float) –
-
setShaftLengthMethod
(self, shaftLengthMethod: QgsMeshRendererVectorSettings.ArrowScalingMethod)¶ Sets method used for drawing arrows
- Parameters
shaftLengthMethod (QgsMeshRendererVectorSettings.ArrowScalingMethod) –
-
setUserGridCellHeight
(self, height: int)¶ Sets height of user grid cell (in pixels)
- Parameters
height (int) –
-
setUserGridCellWidth
(self, width: int)¶ Sets width of user grid cell (in pixels)
- Parameters
width (int) –
-
shaftLengthMethod
(self) → QgsMeshRendererVectorSettings.ArrowScalingMethod¶ Returns method used for drawing arrows
- Return type
-
userGridCellHeight
(self) → int¶ Returns height in pixels of user grid cell
- Return type
int
-
userGridCellWidth
(self) → int¶ Returns width in pixels of user grid cell
- Return type
int
-
writeXml
(self, doc: QDomDocument) → QDomElement¶ Writes configuration to a new DOM element
- Parameters
doc (QDomDocument) –
- Return type
QDomElement
-
class