QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
vectorfield
qgsvectorfieldstreamlinesettings.cpp
Go to the documentation of this file.
1
/***************************************************************************
2
qgsvectorfieldstreamlinesettings.cpp
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
#include "
qgsvectorfieldstreamlinesettings.h
"
17
18
#include <QString>
19
20
using namespace
Qt::StringLiterals;
21
22
Qgis::VectorFieldSeedingMethod
QgsVectorFieldStreamlineSettings::seedingMethod
()
const
23
{
24
return
mSeedingMethod;
25
}
26
27
void
QgsVectorFieldStreamlineSettings::setSeedingMethod
(
const
Qgis::VectorFieldSeedingMethod
&
seedingMethod
)
28
{
29
mSeedingMethod =
seedingMethod
;
30
}
31
32
double
QgsVectorFieldStreamlineSettings::seedingDensity
()
const
33
{
34
return
mSeedingDensity;
35
}
36
37
void
QgsVectorFieldStreamlineSettings::setSeedingDensity
(
double
seedingDensity
)
38
{
39
mSeedingDensity =
seedingDensity
;
40
}
41
42
QDomElement
QgsVectorFieldStreamlineSettings::writeXml
( QDomDocument &doc )
const
43
{
44
QDomElement elem = doc.createElement( u
"vector-streamline-settings"
_s );
45
46
elem.setAttribute( u
"seeding-method"
_s,
static_cast<
int
>
( mSeedingMethod ) );
47
elem.setAttribute( u
"seeding-density"
_s, mSeedingDensity );
48
49
return
elem;
50
}
51
52
void
QgsVectorFieldStreamlineSettings::readXml
(
const
QDomElement &elem )
53
{
54
mSeedingMethod =
static_cast<
Qgis::VectorFieldSeedingMethod
>
( elem.attribute( u
"seeding-method"
_s ).toInt() );
55
mSeedingDensity = elem.attribute( u
"seeding-density"
_s ).toDouble();
56
}
Qgis::VectorFieldSeedingMethod
VectorFieldSeedingMethod
Method used to define start points that are used to draw streamlines.
Definition
qgis.h:7250
QgsVectorFieldStreamlineSettings::setSeedingMethod
void setSeedingMethod(const Qgis::VectorFieldSeedingMethod &seedingMethod)
Sets the method used for seeding start points of strealines.
Definition
qgsvectorfieldstreamlinesettings.cpp:27
QgsVectorFieldStreamlineSettings::readXml
void readXml(const QDomElement &elem)
Reads configuration from the given DOM element.
Definition
qgsvectorfieldstreamlinesettings.cpp:52
QgsVectorFieldStreamlineSettings::seedingMethod
Qgis::VectorFieldSeedingMethod seedingMethod() const
Returns the method used for seeding start points of strealines.
Definition
qgsvectorfieldstreamlinesettings.cpp:22
QgsVectorFieldStreamlineSettings::seedingDensity
double seedingDensity() const
Returns the density used for seeding start points.
Definition
qgsvectorfieldstreamlinesettings.cpp:32
QgsVectorFieldStreamlineSettings::setSeedingDensity
void setSeedingDensity(double seedingDensity)
Sets the density used for seeding start points.
Definition
qgsvectorfieldstreamlinesettings.cpp:37
QgsVectorFieldStreamlineSettings::writeXml
QDomElement writeXml(QDomDocument &doc) const
Writes configuration to a new DOM element.
Definition
qgsvectorfieldstreamlinesettings.cpp:42
qgsvectorfieldstreamlinesettings.h
Generated on
for QGIS API Documentation by
1.17.0