QGIS API Documentation  3.10.0-A Coruña (6c816b4204)
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...
 
bool isOnUserDefinedGrid () const
 Returns whether vectors are drawn on user-defined grid. 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...
 
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 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 setOnUserDefinedGrid (bool enabled)
 Toggles drawing of vectors on user defined grid. More...
 
void setScaleFactor (double scaleFactor)
 Sets scale factor. More...
 
void setShaftLengthMethod (ArrowScalingMethod shaftLengthMethod)
 Sets method used for drawing arrows. More...
 
void setUserGridCellHeight (int height)
 Sets height of user grid cell (in pixels) More...
 
void setUserGridCellWidth (int width)
 Sets width of user grid cell (in pixels) More...
 
QgsMeshRendererVectorSettings::ArrowScalingMethod shaftLengthMethod () const
 Returns method used for drawing arrows. More...
 
int userGridCellHeight () const
 Returns height in pixels of user grid cell. More...
 
int userGridCellWidth () const
 Returns width in pixels of user grid cell. More...
 
QDomElement writeXml (QDomDocument &doc) const
 Writes configuration to a new DOM element. 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 118 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 123 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 216 of file qgsmeshrenderersettings.cpp.

◆ arrowHeadWidthRatio()

double QgsMeshRendererVectorSettings::arrowHeadWidthRatio ( ) const

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

Definition at line 206 of file qgsmeshrenderersettings.cpp.

◆ color()

QColor QgsMeshRendererVectorSettings::color ( ) const

Returns color used for drawing arrows.

Definition at line 126 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 146 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 136 of file qgsmeshrenderersettings.cpp.

◆ fixedShaftLength()

double QgsMeshRendererVectorSettings::fixedShaftLength ( ) const

Returns fixed arrow length (in millimeters)

Only for QgsMeshRendererVectorSettings::ArrowScalingMethod::Fixed

Definition at line 196 of file qgsmeshrenderersettings.cpp.

◆ isOnUserDefinedGrid()

bool QgsMeshRendererVectorSettings::isOnUserDefinedGrid ( ) const

Returns whether vectors are drawn on user-defined grid.

Definition at line 226 of file qgsmeshrenderersettings.cpp.

◆ lineWidth()

double QgsMeshRendererVectorSettings::lineWidth ( ) const

Returns line width of the arrow (in millimeters)

Definition at line 116 of file qgsmeshrenderersettings.cpp.

◆ maxShaftLength()

double QgsMeshRendererVectorSettings::maxShaftLength ( ) const

Returns maximum shaft length (in millimeters)

Only for QgsMeshRendererVectorSettings::ArrowScalingMethod::MinMax

Definition at line 176 of file qgsmeshrenderersettings.cpp.

◆ minShaftLength()

double QgsMeshRendererVectorSettings::minShaftLength ( ) const

Returns mininimum shaft length (in millimeters)

Only for QgsMeshRendererVectorSettings::ArrowScalingMethod::MinMax

Definition at line 166 of file qgsmeshrenderersettings.cpp.

◆ readXml()

void QgsMeshRendererVectorSettings::readXml ( const QDomElement &  elem)

Reads configuration from the given DOM element.

Definition at line 292 of file qgsmeshrenderersettings.cpp.

◆ scaleFactor()

double QgsMeshRendererVectorSettings::scaleFactor ( ) const

Returns scale factor.

Only for QgsMeshRendererVectorSettings::ArrowScalingMethod::Scaled

Definition at line 186 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 221 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 211 of file qgsmeshrenderersettings.cpp.

◆ setColor()

void QgsMeshRendererVectorSettings::setColor ( const QColor &  color)

Sets color used for drawing arrows.

Definition at line 131 of file qgsmeshrenderersettings.cpp.

◆ setFilterMax()

void QgsMeshRendererVectorSettings::setFilterMax ( double  filterMax)

Sets filter value for vector magnitudes.

See also
filterMax()

Definition at line 151 of file qgsmeshrenderersettings.cpp.

◆ setFilterMin()

void QgsMeshRendererVectorSettings::setFilterMin ( double  filterMin)

Sets filter value for vector magnitudes.

See also
filterMin()

Definition at line 141 of file qgsmeshrenderersettings.cpp.

◆ setFixedShaftLength()

void QgsMeshRendererVectorSettings::setFixedShaftLength ( double  fixedShaftLength)

Sets fixed length (in millimeters)

Only for QgsMeshRendererVectorSettings::ArrowScalingMethod::Fixed

Definition at line 201 of file qgsmeshrenderersettings.cpp.

◆ setLineWidth()

void QgsMeshRendererVectorSettings::setLineWidth ( double  lineWidth)

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

Definition at line 121 of file qgsmeshrenderersettings.cpp.

◆ setMaxShaftLength()

void QgsMeshRendererVectorSettings::setMaxShaftLength ( double  maxShaftLength)

Sets maximum shaft length (in millimeters)

Only for QgsMeshRendererVectorSettings::ArrowScalingMethod::MinMax

Definition at line 181 of file qgsmeshrenderersettings.cpp.

◆ setMinShaftLength()

void QgsMeshRendererVectorSettings::setMinShaftLength ( double  minShaftLength)

Sets mininimum shaft length (in millimeters)

Only for QgsMeshRendererVectorSettings::ArrowScalingMethod::MinMax

Definition at line 171 of file qgsmeshrenderersettings.cpp.

◆ setOnUserDefinedGrid()

void QgsMeshRendererVectorSettings::setOnUserDefinedGrid ( bool  enabled)

Toggles drawing of vectors on user defined grid.

Definition at line 231 of file qgsmeshrenderersettings.cpp.

◆ setScaleFactor()

void QgsMeshRendererVectorSettings::setScaleFactor ( double  scaleFactor)

Sets scale factor.

Only for QgsMeshRendererVectorSettings::ArrowScalingMethod::Scaled

Definition at line 191 of file qgsmeshrenderersettings.cpp.

◆ setShaftLengthMethod()

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

Sets method used for drawing arrows.

Definition at line 161 of file qgsmeshrenderersettings.cpp.

◆ setUserGridCellHeight()

void QgsMeshRendererVectorSettings::setUserGridCellHeight ( int  height)

Sets height of user grid cell (in pixels)

Definition at line 251 of file qgsmeshrenderersettings.cpp.

◆ setUserGridCellWidth()

void QgsMeshRendererVectorSettings::setUserGridCellWidth ( int  width)

Sets width of user grid cell (in pixels)

Definition at line 241 of file qgsmeshrenderersettings.cpp.

◆ shaftLengthMethod()

QgsMeshRendererVectorSettings::ArrowScalingMethod QgsMeshRendererVectorSettings::shaftLengthMethod ( ) const

Returns method used for drawing arrows.

Definition at line 156 of file qgsmeshrenderersettings.cpp.

◆ userGridCellHeight()

int QgsMeshRendererVectorSettings::userGridCellHeight ( ) const

Returns height in pixels of user grid cell.

Definition at line 246 of file qgsmeshrenderersettings.cpp.

◆ userGridCellWidth()

int QgsMeshRendererVectorSettings::userGridCellWidth ( ) const

Returns width in pixels of user grid cell.

Definition at line 236 of file qgsmeshrenderersettings.cpp.

◆ writeXml()

QDomElement QgsMeshRendererVectorSettings::writeXml ( QDomDocument &  doc) const

Writes configuration to a new DOM element.

Definition at line 256 of file qgsmeshrenderersettings.cpp.


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