QgsMeshRendererVectorSettings class
Represents a mesh renderer settings for vector datasets.
Contents
- Reference
Public types
- enum ArrowScalingMethod { MinMax = 0, Scaled, Fixed }
- Algorithm how to transform vector magnitude to length of arrow on the device in pixels.
Public functions
- auto arrowHeadLengthRatio() const -> double
- Returns ratio of the head length of the arrow (range 0-1)
- auto arrowHeadWidthRatio() const -> double
- Returns ratio of the head width of the arrow (range 0-1)
- auto color() const -> QColor
- Returns color used for drawing arrows.
- auto filterMax() const -> double
- Returns filter value for vector magnitudes.
- auto filterMin() const -> double
- Returns filter value for vector magnitudes.
- auto fixedShaftLength() const -> double
- Returns fixed arrow length (in millimeters)
- auto isOnUserDefinedGrid() const -> bool
- Returns whether vectors are drawn on user-defined grid.
- auto lineWidth() const -> double
- Returns line width of the arrow (in millimeters)
- auto maxShaftLength() const -> double
- Returns maximum shaft length (in millimeters)
- auto minShaftLength() const -> double
- Returns mininimum shaft length (in millimeters)
- void readXml(const QDomElement& elem)
- Reads configuration from the given DOM element.
- auto scaleFactor() const -> double
- Returns scale factor.
- void setArrowHeadLengthRatio(double arrowHeadLengthRatio)
- Sets ratio of the head length of the arrow (range 0-1)
- void setArrowHeadWidthRatio(double arrowHeadWidthRatio)
- Sets ratio of the head width of the arrow (range 0-1)
- void setColor(const QColor& color)
- Sets color used for drawing arrows.
- void setFilterMax(double filterMax)
- Sets filter value for vector magnitudes.
- void setFilterMin(double filterMin)
- Sets filter value for vector magnitudes.
- void setFixedShaftLength(double fixedShaftLength)
- Sets fixed length (in millimeters)
- void setLineWidth(double lineWidth)
- Sets line width of the arrow in pixels (in millimeters)
- void setMaxShaftLength(double maxShaftLength)
- Sets maximum shaft length (in millimeters)
- void setMinShaftLength(double minShaftLength)
- Sets mininimum shaft length (in millimeters)
- void setOnUserDefinedGrid(bool enabled)
- Toggles drawing of vectors on user defined grid.
- void setScaleFactor(double scaleFactor)
- Sets scale factor.
- void setShaftLengthMethod(ArrowScalingMethod shaftLengthMethod)
- Sets method used for drawing arrows.
- void setUserGridCellHeight(int height)
- Sets height of user grid cell (in pixels)
- void setUserGridCellWidth(int width)
- Sets width of user grid cell (in pixels)
-
auto shaftLengthMethod() const -> QgsMeshRendererVectorSettings::
ArrowScalingMethod - Returns method used for drawing arrows.
- auto userGridCellHeight() const -> int
- Returns height in pixels of user grid cell.
- auto userGridCellWidth() const -> int
- Returns width in pixels of user grid cell.
- auto writeXml(QDomDocument& doc) const -> QDomElement
- Writes configuration to a new DOM element.
Enum documentation
enum QgsMeshRendererVectorSettings:: ArrowScalingMethod
Algorithm how to transform vector magnitude to length of arrow on the device in pixels.
| Enumerators | |
|---|---|
| MinMax |
Scale vector magnitude linearly to fit in range of vectorFilterMin() and vectorFilterMax() |
| Scaled |
Scale vector magnitude by factor scaleFactor() |
| Fixed |
Use fixed length fixedShaftLength() regardless of vector's magnitude. |
Function documentation
double QgsMeshRendererVectorSettings:: filterMax() const
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.
double QgsMeshRendererVectorSettings:: filterMin() const
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.
double QgsMeshRendererVectorSettings:: fixedShaftLength() const
Returns fixed arrow length (in millimeters)
Only for QgsMeshRendererVectorSettings::ArrowScalingMethod::Fixed
double QgsMeshRendererVectorSettings:: maxShaftLength() const
Returns maximum shaft length (in millimeters)
Only for QgsMeshRendererVectorSettings::ArrowScalingMethod::MinMax
double QgsMeshRendererVectorSettings:: minShaftLength() const
Returns mininimum shaft length (in millimeters)
Only for QgsMeshRendererVectorSettings::ArrowScalingMethod::MinMax
double QgsMeshRendererVectorSettings:: scaleFactor() const
Returns scale factor.
Only for QgsMeshRendererVectorSettings::ArrowScalingMethod::Scaled
void QgsMeshRendererVectorSettings:: setFilterMax(double filterMax)
Sets filter value for vector magnitudes.
void QgsMeshRendererVectorSettings:: setFilterMin(double filterMin)
Sets filter value for vector magnitudes.
void QgsMeshRendererVectorSettings:: setFixedShaftLength(double fixedShaftLength)
Sets fixed length (in millimeters)
Only for QgsMeshRendererVectorSettings::ArrowScalingMethod::Fixed
void QgsMeshRendererVectorSettings:: setMaxShaftLength(double maxShaftLength)
Sets maximum shaft length (in millimeters)
Only for QgsMeshRendererVectorSettings::ArrowScalingMethod::MinMax
void QgsMeshRendererVectorSettings:: setMinShaftLength(double minShaftLength)
Sets mininimum shaft length (in millimeters)
Only for QgsMeshRendererVectorSettings::ArrowScalingMethod::MinMax
void QgsMeshRendererVectorSettings:: setScaleFactor(double scaleFactor)
Sets scale factor.
Only for QgsMeshRendererVectorSettings::ArrowScalingMethod::Scaled