QGIS API Documentation 4.3.0-Master (2b7e6c9893e)
Loading...
Searching...
No Matches
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
17
18#include <QString>
19
20using namespace Qt::StringLiterals;
21
26
31
33{
34 return mSeedingDensity;
35}
36
41
42QDomElement 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
52void 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}
VectorFieldSeedingMethod
Method used to define start points that are used to draw streamlines.
Definition qgis.h:7150
void setSeedingMethod(const Qgis::VectorFieldSeedingMethod &seedingMethod)
Sets the method used for seeding start points of strealines.
void readXml(const QDomElement &elem)
Reads configuration from the given DOM element.
Qgis::VectorFieldSeedingMethod seedingMethod() const
Returns the method used for seeding start points of strealines.
double seedingDensity() const
Returns the density used for seeding start points.
void setSeedingDensity(double seedingDensity)
Sets the density used for seeding start points.
QDomElement writeXml(QDomDocument &doc) const
Writes configuration to a new DOM element.