QGIS API Documentation  3.2.0-Bonn (bc43194)
Public Types | Public Member Functions | List of all members
QgsMeshRendererVectorSettings Class Reference

Represents a mesh renderer settings for vector datasets. More...

#include <qgsmeshrenderersettings.h>

Public Types

enum  ArrowScalingMethod { MinMax = 0, Scaled, Fixed }
 Algorithm how to transform vector magnitude to length of arrow on the device in pixels. More...
 

Public Member Functions

double arrowHeadLengthRatio () const
 Returns ratio of the head length of the arrow (range 0-1) More...
 
double arrowHeadWidthRatio () const
 Returns ratio of the head width of the arrow (range 0-1) More...
 
QColor color () const
 Returns color used for drawing arrows. More...
 
double filterMax () const
 Returns filter value for vector magnitudes. More...
 
double filterMin () const
 Returns filter value for vector magnitudes. More...
 
double fixedShaftLength () const
 Returns fixed arrow length (in millimeters) More...
 
double lineWidth () const
 Returns line width of the arrow (in millimeters) More...
 
double maxShaftLength () const
 Returns maximum shaft length (in millimeters) More...
 
double minShaftLength () const
 Returns mininimum shaft length (in millimeters) More...
 
double scaleFactor () const
 Returns scale factor. More...
 
void setArrowHeadLengthRatio (double arrowHeadLengthRatio)
 Sets ratio of the head length of the arrow (range 0-1) More...
 
void setArrowHeadWidthRatio (double arrowHeadWidthRatio)
 Sets ratio of the head width of the arrow (range 0-1) More...
 
void setColor (const QColor &color)
 Sets color used for drawing arrows. More...
 
void setFilterMax (double filterMax)
 Sets filter value for vector magnitudes. More...
 
void setFilterMin (double filterMin)
 Sets filter value for vector magnitudes. More...
 
void setFixedShaftLength (double fixedShaftLength)
 Sets fixed length (in millimeters) More...
 
void setLineWidth (double lineWidth)
 Sets line width of the arrow in pixels (in millimeters) More...
 
void setMaxShaftLength (double maxShaftLength)
 Sets maximum shaft length (in millimeters) More...
 
void setMinShaftLength (double minShaftLength)
 Sets mininimum shaft length (in millimeters) More...
 
void setScaleFactor (double scaleFactor)
 Sets scale factor. More...
 
void setShaftLengthMethod (ArrowScalingMethod shaftLengthMethod)
 Sets method used for drawing arrows. More...
 
QgsMeshRendererVectorSettings::ArrowScalingMethod shaftLengthMethod () const
 Returns method used for drawing arrows. More...
 

Detailed Description

Represents a mesh renderer settings for vector datasets.

Note
The API is considered EXPERIMENTAL and can be changed without a notice
Since
QGIS 3.2

Definition at line 126 of file qgsmeshrenderersettings.h.

Member Enumeration Documentation

◆ ArrowScalingMethod

Algorithm how to transform vector magnitude to length of arrow on the device in pixels.

Enumerator
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.

Definition at line 130 of file qgsmeshrenderersettings.h.

Member Function Documentation

◆ arrowHeadLengthRatio()

double QgsMeshRendererVectorSettings::arrowHeadLengthRatio ( ) const

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

Definition at line 190 of file qgsmeshrenderersettings.cpp.

◆ arrowHeadWidthRatio()

double QgsMeshRendererVectorSettings::arrowHeadWidthRatio ( ) const

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

Definition at line 180 of file qgsmeshrenderersettings.cpp.

◆ color()

QColor QgsMeshRendererVectorSettings::color ( ) const

Returns color used for drawing arrows.

Definition at line 100 of file qgsmeshrenderersettings.cpp.

◆ filterMax()

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.

Definition at line 120 of file qgsmeshrenderersettings.cpp.

◆ filterMin()

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.

Definition at line 110 of file qgsmeshrenderersettings.cpp.

◆ fixedShaftLength()

double QgsMeshRendererVectorSettings::fixedShaftLength ( ) const

Returns fixed arrow length (in millimeters)

Only for QgsMeshRendererVectorSettings::ArrowScalingMethod::Fixed

Definition at line 170 of file qgsmeshrenderersettings.cpp.

◆ lineWidth()

double QgsMeshRendererVectorSettings::lineWidth ( ) const

Returns line width of the arrow (in millimeters)

Definition at line 90 of file qgsmeshrenderersettings.cpp.

◆ maxShaftLength()

double QgsMeshRendererVectorSettings::maxShaftLength ( ) const

Returns maximum shaft length (in millimeters)

Only for QgsMeshRendererVectorSettings::ArrowScalingMethod::MinMax

Definition at line 150 of file qgsmeshrenderersettings.cpp.

◆ minShaftLength()

double QgsMeshRendererVectorSettings::minShaftLength ( ) const

Returns mininimum shaft length (in millimeters)

Only for QgsMeshRendererVectorSettings::ArrowScalingMethod::MinMax

Definition at line 140 of file qgsmeshrenderersettings.cpp.

◆ scaleFactor()

double QgsMeshRendererVectorSettings::scaleFactor ( ) const

Returns scale factor.

Only for QgsMeshRendererVectorSettings::ArrowScalingMethod::Scaled

Definition at line 160 of file qgsmeshrenderersettings.cpp.

◆ setArrowHeadLengthRatio()

void QgsMeshRendererVectorSettings::setArrowHeadLengthRatio ( double  arrowHeadLengthRatio)

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

Definition at line 195 of file qgsmeshrenderersettings.cpp.

◆ setArrowHeadWidthRatio()

void QgsMeshRendererVectorSettings::setArrowHeadWidthRatio ( double  arrowHeadWidthRatio)

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

Definition at line 185 of file qgsmeshrenderersettings.cpp.

◆ setColor()

void QgsMeshRendererVectorSettings::setColor ( const QColor &  color)

Sets color used for drawing arrows.

Definition at line 105 of file qgsmeshrenderersettings.cpp.

◆ setFilterMax()

void QgsMeshRendererVectorSettings::setFilterMax ( double  filterMax)

Sets filter value for vector magnitudes.

See also
filterMax()

Definition at line 125 of file qgsmeshrenderersettings.cpp.

◆ setFilterMin()

void QgsMeshRendererVectorSettings::setFilterMin ( double  filterMin)

Sets filter value for vector magnitudes.

See also
filterMin()

Definition at line 115 of file qgsmeshrenderersettings.cpp.

◆ setFixedShaftLength()

void QgsMeshRendererVectorSettings::setFixedShaftLength ( double  fixedShaftLength)

Sets fixed length (in millimeters)

Only for QgsMeshRendererVectorSettings::ArrowScalingMethod::Fixed

Definition at line 175 of file qgsmeshrenderersettings.cpp.

◆ setLineWidth()

void QgsMeshRendererVectorSettings::setLineWidth ( double  lineWidth)

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

Definition at line 95 of file qgsmeshrenderersettings.cpp.

◆ setMaxShaftLength()

void QgsMeshRendererVectorSettings::setMaxShaftLength ( double  maxShaftLength)

Sets maximum shaft length (in millimeters)

Only for QgsMeshRendererVectorSettings::ArrowScalingMethod::MinMax

Definition at line 155 of file qgsmeshrenderersettings.cpp.

◆ setMinShaftLength()

void QgsMeshRendererVectorSettings::setMinShaftLength ( double  minShaftLength)

Sets mininimum shaft length (in millimeters)

Only for QgsMeshRendererVectorSettings::ArrowScalingMethod::MinMax

Definition at line 145 of file qgsmeshrenderersettings.cpp.

◆ setScaleFactor()

void QgsMeshRendererVectorSettings::setScaleFactor ( double  scaleFactor)

Sets scale factor.

Only for QgsMeshRendererVectorSettings::ArrowScalingMethod::Scaled

Definition at line 165 of file qgsmeshrenderersettings.cpp.

◆ setShaftLengthMethod()

void QgsMeshRendererVectorSettings::setShaftLengthMethod ( QgsMeshRendererVectorSettings::ArrowScalingMethod  shaftLengthMethod)

Sets method used for drawing arrows.

Definition at line 135 of file qgsmeshrenderersettings.cpp.

◆ shaftLengthMethod()

QgsMeshRendererVectorSettings::ArrowScalingMethod QgsMeshRendererVectorSettings::shaftLengthMethod ( ) const

Returns method used for drawing arrows.

Definition at line 130 of file qgsmeshrenderersettings.cpp.


The documentation for this class was generated from the following files: