32 return mReductionFactor;
37 mReductionFactor = value;
43 QDomElement elem = doc.createElement( QStringLiteral(
"mesh-simplify-settings" ) );
44 elem.setAttribute( QStringLiteral(
"enabled" ), mEnabled ? QStringLiteral(
"1" ) : QStringLiteral(
"0" ) );
45 elem.setAttribute( QStringLiteral(
"reduction-factor" ), mReductionFactor );
46 elem.setAttribute( QStringLiteral(
"mesh-resolution" ), mMeshResolution );
53 mEnabled = elem.attribute( QStringLiteral(
"enabled" ) ).toInt();
54 mReductionFactor = elem.attribute( QStringLiteral(
"reduction-factor" ) ).toDouble();
55 mMeshResolution = elem.attribute( QStringLiteral(
"mesh-resolution" ) ).toInt();
60 return mMeshResolution;
QDomElement writeXml(QDomDocument &doc, const QgsReadWriteContext &context) const
Writes configuration to a new DOM element.
void setMeshResolution(int meshResolution)
Sets the mesh resolution e.i., the minimum size (average) of triangles in pixels This value is used d...
void setEnabled(bool isEnabled)
Sets if the overview is active.
double reductionFactor() const
Returns the reduction factor used to build simplified mesh.
bool isEnabled() const
Returns if the overview is active.
int meshResolution() const
Returns the mesh resolution e.i., the minimum size (average) of triangles in pixels.
void setReductionFactor(double value)
Sets the reduction factor used to build simplified mesh.
void readXml(const QDomElement &elem, const QgsReadWriteContext &context)
Reads configuration from the given DOM element.
The class is used as a container of context for various read/write operations on other objects.