QGIS API Documentation 4.3.0-Master (2b7e6c9893e)
Loading...
Searching...
No Matches
qgsvectorfieldarrowsettings.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsvectorfieldarrowsettings.h
3 ---------------------
4 begin : September 2026
5 copyright : (C) 2026 by Stefanos Natsis
6 email : uclaros at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSVECTORFIELDARROWSETTINGS_H
17#define QGSVECTORFIELDARROWSETTINGS_H
18
19#include "qgis.h"
20#include "qgis_core.h"
21
22#include <QDomElement>
23
32{
33 public:
38
44 double minShaftLength() const;
45
51 void setMinShaftLength( double minShaftLength );
52
58 double maxShaftLength() const;
59
65 void setMaxShaftLength( double maxShaftLength );
66
72 double scaleFactor() const;
73
79 void setScaleFactor( double scaleFactor );
80
86 double fixedShaftLength() const;
87
94
96 double arrowHeadWidthRatio() const;
99
101 double arrowHeadLengthRatio() const;
104
106 QDomElement writeXml( QDomDocument &doc ) const;
108 void readXml( const QDomElement &elem );
109
110 private:
112 double mMinShaftLength = 0.8; //in millimeters
113 double mMaxShaftLength = 10; //in millimeters
114 double mScaleFactor = 10;
115 double mFixedShaftLength = 20; //in millimeters
116 double mArrowHeadWidthRatio = 0.15;
117 double mArrowHeadLengthRatio = 0.40;
118};
119
120#endif // QGSVECTORFIELDARROWSETTINGS_H
VectorFieldArrowScalingMethod
Algorithm to transform vector magnitude to length of arrow on the device in pixels.
Definition qgis.h:7119
@ MinMax
Scale vector magnitude linearly to fit in range of vectorFilterMin() and vectorFilterMax().
Definition qgis.h:7120
Represents a mesh renderer settings for vector datasets displayed with arrows.
QDomElement writeXml(QDomDocument &doc) const
Writes configuration to a new DOM element.
void setFixedShaftLength(double fixedShaftLength)
Sets fixed length (in millimeters).
double minShaftLength() const
Returns mininimum shaft length (in millimeters).
Qgis::VectorFieldArrowScalingMethod shaftLengthMethod() const
Returns method used for drawing arrows.
void readXml(const QDomElement &elem)
Reads configuration from the given DOM element.
void setMinShaftLength(double minShaftLength)
Sets mininimum shaft length (in millimeters).
double arrowHeadLengthRatio() const
Returns ratio of the head length of the arrow (range 0-1).
void setShaftLengthMethod(Qgis::VectorFieldArrowScalingMethod shaftLengthMethod)
Sets method used for drawing arrows.
void setScaleFactor(double scaleFactor)
Sets scale factor.
double fixedShaftLength() const
Returns fixed arrow length (in millimeters).
void setArrowHeadWidthRatio(double arrowHeadWidthRatio)
Sets ratio of the head width of the arrow (range 0-1).
void setMaxShaftLength(double maxShaftLength)
Sets maximum shaft length (in millimeters).
double arrowHeadWidthRatio() const
Returns ratio of the head width of the arrow (range 0-1).
double maxShaftLength() const
Returns maximum shaft length (in millimeters).
double scaleFactor() const
Returns scale factor.
void setArrowHeadLengthRatio(double arrowHeadLengthRatio)
Sets ratio of the head length of the arrow (range 0-1).