QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
Public Types | Public Member Functions | List of all members
QgsMeshRendererVectorArrowSettings Class Reference

Represents a mesh renderer settings for vector datasets displayed with arrows. 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...
 
double fixedShaftLength () const
 Returns fixed arrow length (in millimeters) More...
 
double maxShaftLength () const
 Returns maximum shaft length (in millimeters) More...
 
double minShaftLength () const
 Returns mininimum shaft length (in millimeters) More...
 
void readXml (const QDomElement &elem)
 Reads configuration from the given DOM element. 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 setFixedShaftLength (double fixedShaftLength)
 Sets fixed length (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...
 
QgsMeshRendererVectorArrowSettings::ArrowScalingMethod shaftLengthMethod () const
 Returns method used for drawing arrows. More...
 
QDomElement writeXml (QDomDocument &doc) const
 Writes configuration to a new DOM element. More...
 

Detailed Description

Represents a mesh renderer settings for vector datasets displayed with arrows.

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

Definition at line 205 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 210 of file qgsmeshrenderersettings.h.

Member Function Documentation

◆ arrowHeadLengthRatio()

double QgsMeshRendererVectorArrowSettings::arrowHeadLengthRatio ( ) const

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

Definition at line 323 of file qgsmeshrenderersettings.cpp.

◆ arrowHeadWidthRatio()

double QgsMeshRendererVectorArrowSettings::arrowHeadWidthRatio ( ) const

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

Definition at line 313 of file qgsmeshrenderersettings.cpp.

◆ fixedShaftLength()

double QgsMeshRendererVectorArrowSettings::fixedShaftLength ( ) const

Returns fixed arrow length (in millimeters)

Only for QgsMeshRendererVectorSettings::ArrowScalingMethod::Fixed

Definition at line 303 of file qgsmeshrenderersettings.cpp.

◆ maxShaftLength()

double QgsMeshRendererVectorArrowSettings::maxShaftLength ( ) const

Returns maximum shaft length (in millimeters)

Only for QgsMeshRendererVectorSettings::ArrowScalingMethod::MinMax

Definition at line 283 of file qgsmeshrenderersettings.cpp.

◆ minShaftLength()

double QgsMeshRendererVectorArrowSettings::minShaftLength ( ) const

Returns mininimum shaft length (in millimeters)

Only for QgsMeshRendererVectorSettings::ArrowScalingMethod::MinMax

Definition at line 273 of file qgsmeshrenderersettings.cpp.

◆ readXml()

void QgsMeshRendererVectorArrowSettings::readXml ( const QDomElement &  elem)

Reads configuration from the given DOM element.

Definition at line 362 of file qgsmeshrenderersettings.cpp.

◆ scaleFactor()

double QgsMeshRendererVectorArrowSettings::scaleFactor ( ) const

Returns scale factor.

Only for QgsMeshRendererVectorSettings::ArrowScalingMethod::Scaled

Definition at line 293 of file qgsmeshrenderersettings.cpp.

◆ setArrowHeadLengthRatio()

void QgsMeshRendererVectorArrowSettings::setArrowHeadLengthRatio ( double  arrowHeadLengthRatio)

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

Definition at line 328 of file qgsmeshrenderersettings.cpp.

◆ setArrowHeadWidthRatio()

void QgsMeshRendererVectorArrowSettings::setArrowHeadWidthRatio ( double  arrowHeadWidthRatio)

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

Definition at line 318 of file qgsmeshrenderersettings.cpp.

◆ setFixedShaftLength()

void QgsMeshRendererVectorArrowSettings::setFixedShaftLength ( double  fixedShaftLength)

Sets fixed length (in millimeters)

Only for QgsMeshRendererVectorSettings::ArrowScalingMethod::Fixed

Definition at line 308 of file qgsmeshrenderersettings.cpp.

◆ setMaxShaftLength()

void QgsMeshRendererVectorArrowSettings::setMaxShaftLength ( double  maxShaftLength)

Sets maximum shaft length (in millimeters)

Only for QgsMeshRendererVectorSettings::ArrowScalingMethod::MinMax

Definition at line 288 of file qgsmeshrenderersettings.cpp.

◆ setMinShaftLength()

void QgsMeshRendererVectorArrowSettings::setMinShaftLength ( double  minShaftLength)

Sets mininimum shaft length (in millimeters)

Only for QgsMeshRendererVectorSettings::ArrowScalingMethod::MinMax

Definition at line 278 of file qgsmeshrenderersettings.cpp.

◆ setScaleFactor()

void QgsMeshRendererVectorArrowSettings::setScaleFactor ( double  scaleFactor)

Sets scale factor.

Only for QgsMeshRendererVectorSettings::ArrowScalingMethod::Scaled

Definition at line 298 of file qgsmeshrenderersettings.cpp.

◆ setShaftLengthMethod()

void QgsMeshRendererVectorArrowSettings::setShaftLengthMethod ( QgsMeshRendererVectorArrowSettings::ArrowScalingMethod  shaftLengthMethod)

Sets method used for drawing arrows.

Definition at line 268 of file qgsmeshrenderersettings.cpp.

◆ shaftLengthMethod()

QgsMeshRendererVectorArrowSettings::ArrowScalingMethod QgsMeshRendererVectorArrowSettings::shaftLengthMethod ( ) const

Returns method used for drawing arrows.

Definition at line 263 of file qgsmeshrenderersettings.cpp.

◆ writeXml()

QDomElement QgsMeshRendererVectorArrowSettings::writeXml ( QDomDocument &  doc) const

Writes configuration to a new DOM element.

Definition at line 333 of file qgsmeshrenderersettings.cpp.


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