QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
vectorfield
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
31
class
CORE_EXPORT
QgsVectorFieldArrowSettings
32
{
33
public
:
35
Qgis::VectorFieldArrowScalingMethod
shaftLengthMethod
()
const
;
37
void
setShaftLengthMethod
(
Qgis::VectorFieldArrowScalingMethod
shaftLengthMethod
);
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
93
void
setFixedShaftLength
(
double
fixedShaftLength
);
94
96
double
arrowHeadWidthRatio
()
const
;
98
void
setArrowHeadWidthRatio
(
double
arrowHeadWidthRatio
);
99
101
double
arrowHeadLengthRatio
()
const
;
103
void
setArrowHeadLengthRatio
(
double
arrowHeadLengthRatio
);
104
106
QDomElement
writeXml
( QDomDocument &doc )
const
;
108
void
readXml
(
const
QDomElement &elem );
109
110
private
:
111
Qgis::VectorFieldArrowScalingMethod
mShaftLengthMethod =
Qgis::VectorFieldArrowScalingMethod::MinMax
;
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
Qgis::VectorFieldArrowScalingMethod
VectorFieldArrowScalingMethod
Algorithm to transform vector magnitude to length of arrow on the device in pixels.
Definition
qgis.h:7219
Qgis::VectorFieldArrowScalingMethod::MinMax
@ MinMax
Scale vector magnitude linearly to fit in range of vectorFilterMin() and vectorFilterMax().
Definition
qgis.h:7220
QgsVectorFieldArrowSettings
Represents a mesh renderer settings for vector datasets displayed with arrows.
Definition
qgsvectorfieldarrowsettings.h:32
QgsVectorFieldArrowSettings::writeXml
QDomElement writeXml(QDomDocument &doc) const
Writes configuration to a new DOM element.
Definition
qgsvectorfieldarrowsettings.cpp:92
QgsVectorFieldArrowSettings::setFixedShaftLength
void setFixedShaftLength(double fixedShaftLength)
Sets fixed length (in millimeters).
Definition
qgsvectorfieldarrowsettings.cpp:67
QgsVectorFieldArrowSettings::minShaftLength
double minShaftLength() const
Returns mininimum shaft length (in millimeters).
Definition
qgsvectorfieldarrowsettings.cpp:32
QgsVectorFieldArrowSettings::shaftLengthMethod
Qgis::VectorFieldArrowScalingMethod shaftLengthMethod() const
Returns method used for drawing arrows.
Definition
qgsvectorfieldarrowsettings.cpp:22
QgsVectorFieldArrowSettings::readXml
void readXml(const QDomElement &elem)
Reads configuration from the given DOM element.
Definition
qgsvectorfieldarrowsettings.cpp:121
QgsVectorFieldArrowSettings::setMinShaftLength
void setMinShaftLength(double minShaftLength)
Sets mininimum shaft length (in millimeters).
Definition
qgsvectorfieldarrowsettings.cpp:37
QgsVectorFieldArrowSettings::arrowHeadLengthRatio
double arrowHeadLengthRatio() const
Returns ratio of the head length of the arrow (range 0-1).
Definition
qgsvectorfieldarrowsettings.cpp:82
QgsVectorFieldArrowSettings::setShaftLengthMethod
void setShaftLengthMethod(Qgis::VectorFieldArrowScalingMethod shaftLengthMethod)
Sets method used for drawing arrows.
Definition
qgsvectorfieldarrowsettings.cpp:27
QgsVectorFieldArrowSettings::setScaleFactor
void setScaleFactor(double scaleFactor)
Sets scale factor.
Definition
qgsvectorfieldarrowsettings.cpp:57
QgsVectorFieldArrowSettings::fixedShaftLength
double fixedShaftLength() const
Returns fixed arrow length (in millimeters).
Definition
qgsvectorfieldarrowsettings.cpp:62
QgsVectorFieldArrowSettings::setArrowHeadWidthRatio
void setArrowHeadWidthRatio(double arrowHeadWidthRatio)
Sets ratio of the head width of the arrow (range 0-1).
Definition
qgsvectorfieldarrowsettings.cpp:77
QgsVectorFieldArrowSettings::setMaxShaftLength
void setMaxShaftLength(double maxShaftLength)
Sets maximum shaft length (in millimeters).
Definition
qgsvectorfieldarrowsettings.cpp:47
QgsVectorFieldArrowSettings::arrowHeadWidthRatio
double arrowHeadWidthRatio() const
Returns ratio of the head width of the arrow (range 0-1).
Definition
qgsvectorfieldarrowsettings.cpp:72
QgsVectorFieldArrowSettings::maxShaftLength
double maxShaftLength() const
Returns maximum shaft length (in millimeters).
Definition
qgsvectorfieldarrowsettings.cpp:42
QgsVectorFieldArrowSettings::scaleFactor
double scaleFactor() const
Returns scale factor.
Definition
qgsvectorfieldarrowsettings.cpp:52
QgsVectorFieldArrowSettings::setArrowHeadLengthRatio
void setArrowHeadLengthRatio(double arrowHeadLengthRatio)
Sets ratio of the head length of the arrow (range 0-1).
Definition
qgsvectorfieldarrowsettings.cpp:87
qgis.h
Generated on
for QGIS API Documentation by
1.17.0