54   return mLineWidthUnit;
 
   64   QDomElement elem = doc.createElement( QStringLiteral( 
"mesh-settings" ) );
 
   65   elem.setAttribute( QStringLiteral( 
"enabled" ), mEnabled ? QStringLiteral( 
"1" ) : QStringLiteral( 
"0" ) );
 
   66   elem.setAttribute( QStringLiteral( 
"line-width" ), mLineWidth );
 
   74   mEnabled = elem.attribute( QStringLiteral( 
"enabled" ) ).toInt();
 
   75   mLineWidth = elem.attribute( QStringLiteral( 
"line-width" ) ).toDouble();
 
   83   return mColorRampShader;
 
   88   mColorRampShader = shader;
 
   97   mClassificationMinimum = minimum;
 
   98   mClassificationMaximum = maximum;
 
  107   return mDataResamplingMethod;
 
  112   mDataResamplingMethod = dataInterpolationMethod;
 
  117   QDomElement elem = doc.createElement( QStringLiteral( 
"scalar-settings" ) );
 
  118   elem.setAttribute( QStringLiteral( 
"min-val" ), mClassificationMinimum );
 
  119   elem.setAttribute( QStringLiteral( 
"max-val" ), mClassificationMaximum );
 
  120   elem.setAttribute( QStringLiteral( 
"opacity" ), mOpacity );
 
  123   switch ( mDataResamplingMethod )
 
  126       methodTxt = QStringLiteral( 
"none" );
 
  129       methodTxt = QStringLiteral( 
"neighbour-average" );
 
  132   elem.setAttribute( QStringLiteral( 
"interpolation-method" ), methodTxt );
 
  133   QDomElement elemShader = mColorRampShader.
writeXml( doc, context );
 
  134   elem.appendChild( elemShader );
 
  136   QDomElement elemEdge = doc.createElement( QStringLiteral( 
"edge-settings" ) );
 
  137   elemEdge.appendChild( mEdgeStrokeWidth.
writeXml( doc, context ) );
 
  138   elemEdge.setAttribute( QStringLiteral( 
"stroke-width-unit" ), mEdgeStrokeWidthUnit );
 
  139   elem.appendChild( elemEdge );
 
  146   mClassificationMinimum = elem.attribute( QStringLiteral( 
"min-val" ) ).toDouble();
 
  147   mClassificationMaximum = elem.attribute( QStringLiteral( 
"max-val" ) ).toDouble();
 
  148   mOpacity = elem.attribute( QStringLiteral( 
"opacity" ) ).toDouble();
 
  150   QString methodTxt = elem.attribute( QStringLiteral( 
"interpolation-method" ) );
 
  151   if ( QStringLiteral( 
"neighbour-average" ) == methodTxt )
 
  153     mDataResamplingMethod = DataResamplingMethod::NeighbourAverage;
 
  157     mDataResamplingMethod = DataResamplingMethod::None;
 
  159   QDomElement elemShader = elem.firstChildElement( QStringLiteral( 
"colorrampshader" ) );
 
  160   mColorRampShader.
readXml( elemShader, context );
 
  162   QDomElement elemEdge = elem.firstChildElement( QStringLiteral( 
"edge-settings" ) );
 
  163   QDomElement elemEdgeStrokeWidth = elemEdge.firstChildElement( QStringLiteral( 
"mesh-stroke-width" ) );
 
  164   mEdgeStrokeWidth.
readXml( elemEdgeStrokeWidth, context );
 
  166                            elemEdge.attribute( QStringLiteral( 
"stroke-width-unit" ) ).toInt() );
 
  171   return mEdgeStrokeWidth;
 
  176   mEdgeStrokeWidth = strokeWidth;
 
  181   return mEdgeStrokeWidthUnit;
 
  208   mColor = vectorColor;
 
  218   mFilterMin = vectorFilterMin;
 
  228   mFilterMax = vectorFilterMax;
 
  233   return mOnUserDefinedGrid;
 
  238   mOnUserDefinedGrid = enabled;
 
  243   return mUserGridCellWidth;
 
  248   mUserGridCellWidth = width;
 
  253   return mUserGridCellHeight;
 
  258   mUserGridCellHeight = height;
 
  263   return mShaftLengthMethod;
 
  273   return mMinShaftLength;
 
  283   return mMaxShaftLength;
 
  303   return mFixedShaftLength;
 
  313   return mArrowHeadWidthRatio;
 
  318   mArrowHeadWidthRatio = vectorHeadWidthRatio;
 
  323   return mArrowHeadLengthRatio;
 
  328   mArrowHeadLengthRatio = vectorHeadLengthRatio;
 
  333   QDomElement elem = doc.createElement( QStringLiteral( 
"vector-arrow-settings" ) );
 
  334   elem.setAttribute( QStringLiteral( 
"arrow-head-width-ratio" ), mArrowHeadWidthRatio );
 
  335   elem.setAttribute( QStringLiteral( 
"arrow-head-length-ratio" ), mArrowHeadLengthRatio );
 
  337   QDomElement elemShaft = doc.createElement( QStringLiteral( 
"shaft-length" ) );
 
  339   switch ( mShaftLengthMethod )
 
  342       methodTxt = QStringLiteral( 
"minmax" );
 
  343       elemShaft.setAttribute( QStringLiteral( 
"min" ), mMinShaftLength );
 
  344       elemShaft.setAttribute( QStringLiteral( 
"max" ), mMaxShaftLength );
 
  347       methodTxt = QStringLiteral( 
"scaled" );
 
  348       elemShaft.setAttribute( QStringLiteral( 
"scale-factor" ), mScaleFactor );
 
  351       methodTxt = QStringLiteral( 
"fixed" ) ;
 
  352       elemShaft.setAttribute( QStringLiteral( 
"fixed-length" ), mFixedShaftLength );
 
  355   elemShaft.setAttribute( QStringLiteral( 
"method" ), methodTxt );
 
  356   elem.appendChild( elemShaft );
 
  362   mArrowHeadWidthRatio = elem.attribute( QStringLiteral( 
"arrow-head-width-ratio" ) ).toDouble();
 
  363   mArrowHeadLengthRatio = elem.attribute( QStringLiteral( 
"arrow-head-length-ratio" ) ).toDouble();
 
  365   QDomElement elemShaft = elem.firstChildElement( QStringLiteral( 
"shaft-length" ) );
 
  366   QString methodTxt = elemShaft.attribute( QStringLiteral( 
"method" ) );
 
  367   if ( QStringLiteral( 
"minmax" ) == methodTxt )
 
  369     mShaftLengthMethod = 
MinMax;
 
  370     mMinShaftLength = elemShaft.attribute( QStringLiteral( 
"min" ) ).toDouble();
 
  371     mMaxShaftLength = elemShaft.attribute( QStringLiteral( 
"max" ) ).toDouble();
 
  373   else if ( QStringLiteral( 
"scaled" ) == methodTxt )
 
  375     mShaftLengthMethod = 
Scaled;
 
  376     mScaleFactor = elemShaft.attribute( QStringLiteral( 
"scale-factor" ) ).toDouble();
 
  380     mShaftLengthMethod = 
Fixed;
 
  381     mFixedShaftLength = elemShaft.attribute( QStringLiteral( 
"fixed-length" ) ).toDouble();
 
  396   return mAveragingMethod.get();
 
  402     mAveragingMethod.reset( method->
clone() );
 
  404     mAveragingMethod.reset();
 
  409   QDomElement elem = doc.createElement( QStringLiteral( 
"mesh-renderer-settings" ) );
 
  411   QDomElement elemActiveDatasetGroup = doc.createElement( QStringLiteral( 
"active-dataset-group" ) );
 
  412   elemActiveDatasetGroup.setAttribute( QStringLiteral( 
"scalar" ), mActiveScalarDatasetGroup );
 
  413   elemActiveDatasetGroup.setAttribute( QStringLiteral( 
"vector" ), mActiveVectorDatasetGroup );
 
  414   elem.appendChild( elemActiveDatasetGroup );
 
  416   for ( 
int groupIndex : mRendererScalarSettings.keys() )
 
  420     elemScalar.setAttribute( QStringLiteral( 
"group" ), groupIndex );
 
  421     elem.appendChild( elemScalar );
 
  424   for ( 
int groupIndex : mRendererVectorSettings.keys() )
 
  428     elemVector.setAttribute( QStringLiteral( 
"group" ), groupIndex );
 
  429     elem.appendChild( elemVector );
 
  432   QDomElement elemNativeMesh = mRendererNativeMeshSettings.
writeXml( doc );
 
  433   elemNativeMesh.setTagName( QStringLiteral( 
"mesh-settings-native" ) );
 
  434   elem.appendChild( elemNativeMesh );
 
  436   QDomElement elemEdgeMesh = mRendererEdgeMeshSettings.
writeXml( doc );
 
  437   elemEdgeMesh.setTagName( QStringLiteral( 
"mesh-settings-edge" ) );
 
  438   elem.appendChild( elemEdgeMesh );
 
  440   QDomElement elemTriangularMesh = mRendererTriangularMeshSettings.
writeXml( doc );
 
  441   elemTriangularMesh.setTagName( QStringLiteral( 
"mesh-settings-triangular" ) );
 
  442   elem.appendChild( elemTriangularMesh );
 
  444   if ( mAveragingMethod )
 
  446     QDomElement elemAveraging = doc.createElement( QStringLiteral( 
"averaging-3d" ) );
 
  447     elemAveraging.setAttribute( QStringLiteral( 
"method" ), QString::number( mAveragingMethod->method() ) ) ;
 
  448     QDomElement elemAveragingParams = mAveragingMethod->writeXml( doc );
 
  449     elemAveraging.appendChild( elemAveragingParams );
 
  450     elem.appendChild( elemAveraging );
 
  458   mRendererScalarSettings.clear();
 
  459   mRendererVectorSettings.clear();
 
  460   mAveragingMethod.reset();
 
  462   QDomElement elemActiveDataset = elem.firstChildElement( QStringLiteral( 
"active-dataset-group" ) );
 
  463   if ( elemActiveDataset.hasAttribute( QStringLiteral( 
"scalar" ) ) )
 
  464     mActiveScalarDatasetGroup = elemActiveDataset.attribute( QStringLiteral( 
"scalar" ) ).toInt();
 
  466   if ( elemActiveDataset.hasAttribute( QStringLiteral( 
"vector" ) ) )
 
  467     mActiveVectorDatasetGroup = elemActiveDataset.attribute( QStringLiteral( 
"vector" ) ).toInt();
 
  469   QDomElement elemScalar = elem.firstChildElement( QStringLiteral( 
"scalar-settings" ) );
 
  470   while ( !elemScalar.isNull() )
 
  472     int groupIndex = elemScalar.attribute( QStringLiteral( 
"group" ) ).toInt();
 
  477     elemScalar = elemScalar.nextSiblingElement( QStringLiteral( 
"scalar-settings" ) );
 
  480   QDomElement elemVector = elem.firstChildElement( QStringLiteral( 
"vector-settings" ) );
 
  481   while ( !elemVector.isNull() )
 
  483     int groupIndex = elemVector.attribute( QStringLiteral( 
"group" ) ).toInt();
 
  488     elemVector = elemVector.nextSiblingElement( QStringLiteral( 
"vector-settings" ) );
 
  491   QDomElement elemNativeMesh = elem.firstChildElement( QStringLiteral( 
"mesh-settings-native" ) );
 
  492   mRendererNativeMeshSettings.
readXml( elemNativeMesh );
 
  494   QDomElement elemEdgeMesh = elem.firstChildElement( QStringLiteral( 
"mesh-settings-edge" ) );
 
  495   mRendererEdgeMeshSettings.
readXml( elemEdgeMesh );
 
  497   QDomElement elemTriangularMesh = elem.firstChildElement( QStringLiteral( 
"mesh-settings-triangular" ) );
 
  498   mRendererTriangularMeshSettings.
readXml( elemTriangularMesh );
 
  500   QDomElement elemAveraging = elem.firstChildElement( QStringLiteral( 
"averaging-3d" ) );
 
  501   if ( !elemAveraging.isNull() )
 
  509   return mActiveScalarDatasetGroup;
 
  519   return mActiveVectorDatasetGroup;
 
  529   return mSeedingMethod;
 
  539   return mSeedingDensity;
 
  549   QDomElement elem = doc.createElement( QStringLiteral( 
"vector-streamline-settings" ) );
 
  551   elem.setAttribute( QStringLiteral( 
"seeding-method" ), mSeedingMethod );
 
  552   elem.setAttribute( QStringLiteral( 
"seeding-density" ), mSeedingDensity );
 
  561       elem.attribute( QStringLiteral( 
"seeding-method" ) ).toInt() );
 
  562   mSeedingDensity = elem.attribute( QStringLiteral( 
"seeding-density" ) ).toDouble();
 
  567   return mDisplayingMethod;
 
  572   mDisplayingMethod = displayingMethod;
 
  577   return mArrowsSettings;
 
  587   return mStreamLinesSettings;
 
  597   QDomElement elem = doc.createElement( QStringLiteral( 
"vector-settings" ) );
 
  598   elem.setAttribute( QStringLiteral( 
"symbology" ), mDisplayingMethod );
 
  600   elem.setAttribute( QStringLiteral( 
"line-width" ), mLineWidth );
 
  601   elem.setAttribute( QStringLiteral( 
"coloring-method" ), 
coloringMethod() );
 
  603   QDomElement elemShader = mColorRampShader.
writeXml( doc, context );
 
  604   elem.appendChild( elemShader );
 
  605   elem.setAttribute( QStringLiteral( 
"filter-min" ), mFilterMin );
 
  606   elem.setAttribute( QStringLiteral( 
"filter-max" ), mFilterMax );
 
  608   elem.setAttribute( QStringLiteral( 
"user-grid-enabled" ), mOnUserDefinedGrid ? QStringLiteral( 
"1" ) : QStringLiteral( 
"0" ) );
 
  609   elem.setAttribute( QStringLiteral( 
"user-grid-width" ), mUserGridCellWidth );
 
  610   elem.setAttribute( QStringLiteral( 
"user-grid-height" ), mUserGridCellHeight );
 
  612   elem.appendChild( mArrowsSettings.
writeXml( doc ) );
 
  613   elem.appendChild( mStreamLinesSettings.
writeXml( doc ) );
 
  614   elem.appendChild( mTracesSettings.
writeXml( doc ) );
 
  622                         elem.attribute( QStringLiteral( 
"symbology" ) ).toInt() );
 
  624   mLineWidth = elem.attribute( QStringLiteral( 
"line-width" ) ).toDouble();
 
  626                       elem.attribute( QStringLiteral( 
"coloring-method" ) ).toInt() );
 
  628   mColorRampShader.
readXml( elem.firstChildElement( 
"colorrampshader" ), context );
 
  629   mFilterMin = elem.attribute( QStringLiteral( 
"filter-min" ) ).toDouble();
 
  630   mFilterMax = elem.attribute( QStringLiteral( 
"filter-max" ) ).toDouble();
 
  632   mOnUserDefinedGrid = elem.attribute( QStringLiteral( 
"user-grid-enabled" ) ).toInt(); 
 
  633   mUserGridCellWidth = elem.attribute( QStringLiteral( 
"user-grid-width" ) ).toInt();
 
  634   mUserGridCellHeight = elem.attribute( QStringLiteral( 
"user-grid-height" ) ).toInt();
 
  636   QDomElement elemVector = elem.firstChildElement( QStringLiteral( 
"vector-arrow-settings" ) );
 
  637   if ( ! elemVector.isNull() )
 
  638     mArrowsSettings.
readXml( elemVector );
 
  640   QDomElement elemStreamLine = elem.firstChildElement( QStringLiteral( 
"vector-streamline-settings" ) );
 
  641   if ( ! elemStreamLine.isNull() )
 
  642     mStreamLinesSettings.
readXml( elemStreamLine );
 
  644   QDomElement elemTraces = elem.firstChildElement( QStringLiteral( 
"vector-traces-settings" ) );
 
  645   if ( ! elemTraces.isNull() )
 
  646     mTracesSettings.
readXml( elemTraces );
 
  651   return mColoringMethod;
 
  661   return mColorRampShader;
 
  672   switch ( mColoringMethod )
 
  682   return strokeColoring;
 
  687   return mTracesSettings;
 
  697   mMaximumTailLength = elem.attribute( QStringLiteral( 
"maximum-tail-length" ) ).toInt();
 
  699                              elem.attribute( QStringLiteral( 
"maximum-tail-length-unit" ) ).toInt() );
 
  700   mParticlesCount = elem.attribute( QStringLiteral( 
"particles-count" ) ).toInt();
 
  705   QDomElement elem = doc.createElement( QStringLiteral( 
"vector-traces-settings" ) );
 
  706   elem.setAttribute( QStringLiteral( 
"maximum-tail-length" ), mMaximumTailLength );
 
  707   elem.setAttribute( QStringLiteral( 
"maximum-tail-length-unit" ), mMaximumTailLengthUnit );
 
  708   elem.setAttribute( QStringLiteral( 
"particles-count" ), mParticlesCount );
 
  715   return mMaximumTailLengthUnit;
 
  725   return mMaximumTailLength;
 
  735   return mParticlesCount;
 
  740   mParticlesCount = value;
 
A ramp shader will color a raster pixel based on a list of values ranges in a ramp.
QDomElement writeXml(QDomDocument &doc, const QgsReadWriteContext &context=QgsReadWriteContext()) const
Writes configuration to a new DOM element.
void readXml(const QDomElement &elem, const QgsReadWriteContext &context=QgsReadWriteContext())
Reads configuration from the given DOM element.
Class defining color to render mesh datasets.
ColoringMethod
Defines how the color is defined.
@ ColorRamp
Render with a color ramp.
@ SingleColor
Render with a single color.
Represents a width than can vary depending on values.
void readXml(const QDomElement &elem, const QgsReadWriteContext &context)
Reads configuration from the given DOM element.
QDomElement writeXml(QDomDocument &doc, const QgsReadWriteContext &context) const
Writes configuration to a new DOM element.
Abstract class to interpolate 3d stacked mesh data to 2d data.
virtual QgsMesh3dAveragingMethod * clone() const =0
Clone the instance.
static QgsMesh3dAveragingMethod * createFromXml(const QDomElement &elem)
Creates the instance from XML by calling readXml of derived classes.
Multi level averaging method specifies limits of vertical layers from the top layer down or reversed.
void setEnabled(bool enabled)
Sets whether mesh structure rendering is enabled.
void setLineWidthUnit(const QgsUnitTypes::RenderUnit &lineWidthUnit)
Sets units of the width of the mesh frame.
QColor color() const
Returns color used for rendering.
QDomElement writeXml(QDomDocument &doc) const
Writes configuration to a new DOM element.
QgsUnitTypes::RenderUnit lineWidthUnit() const
Returns units of the width of the mesh frame.
double lineWidth() const
Returns line width used for rendering (in millimeters)
void setLineWidth(double lineWidth)
Sets line width used for rendering (in millimeters)
void readXml(const QDomElement &elem)
Reads configuration from the given DOM element.
bool isEnabled() const
Returns whether mesh structure rendering is enabled.
void setColor(const QColor &color)
Sets color used for rendering of the mesh.
Represents a mesh renderer settings for scalar datasets.
void setClassificationMinimumMaximum(double minimum, double maximum)
Sets min/max values used for creation of the color ramp shader.
double opacity() const
Returns opacity.
void readXml(const QDomElement &elem, const QgsReadWriteContext &context=QgsReadWriteContext())
Reads configuration from the given DOM element.
void setColorRampShader(const QgsColorRampShader &shader)
Sets color ramp shader function.
QgsColorRampShader colorRampShader() const
Returns color ramp shader function.
double classificationMinimum() const
Returns min value used for creation of the color ramp shader.
void setOpacity(double opacity)
Sets opacity.
DataResamplingMethod
Resampling of value from dataset.
@ None
Does not use resampling.
@ NeighbourAverage
Does a simple average of values defined for all surrounding faces/vertices.
DataResamplingMethod dataResamplingMethod() const
Returns the type of interpolation to use to convert face defined datasets to values on vertices.
void setEdgeStrokeWidthUnit(const QgsUnitTypes::RenderUnit &edgeStrokeWidthUnit)
Sets the stroke width unit used to render edges scalar dataset.
QDomElement writeXml(QDomDocument &doc, const QgsReadWriteContext &context=QgsReadWriteContext()) const
Writes configuration to a new DOM element.
void setEdgeStrokeWidth(const QgsInterpolatedLineWidth &strokeWidth)
Sets the stroke width used to render edges scalar dataset.
double classificationMaximum() const
Returns max value used for creation of the color ramp shader.
QgsUnitTypes::RenderUnit edgeStrokeWidthUnit() const
Returns the stroke width unit used to render edges scalar dataset.
QgsInterpolatedLineWidth edgeStrokeWidth() const
Returns the stroke width used to render edges scalar dataset.
void setDataResamplingMethod(const DataResamplingMethod &dataResamplingMethod)
Sets data interpolation method.
void setActiveVectorDatasetGroup(int activeVectorDatasetGroup)
Sets the active vector dataset group.
QgsMeshRendererScalarSettings scalarSettings(int groupIndex) const
Returns renderer settings.
int activeVectorDatasetGroup() const
Returns the active vector dataset group.
int activeScalarDatasetGroup() const
Returns the active scalar dataset group.
QgsMesh3dAveragingMethod * averagingMethod() const
Returns averaging method for conversion of 3d stacked mesh data to 2d data.
QgsMeshRendererVectorSettings vectorSettings(int groupIndex) const
Returns renderer settings.
void setActiveScalarDatasetGroup(int activeScalarDatasetGroup)
Sets the active scalar dataset group.
void readXml(const QDomElement &elem, const QgsReadWriteContext &context=QgsReadWriteContext())
Reads configuration from the given DOM element.
QgsMeshRendererSettings()
Constructs renderer with default single layer averaging method.
QDomElement writeXml(QDomDocument &doc, const QgsReadWriteContext &context=QgsReadWriteContext()) const
Writes configuration to a new DOM element.
void setAveragingMethod(QgsMesh3dAveragingMethod *method)
Sets averaging method for conversion of 3d stacked mesh data to 2d data.
~QgsMeshRendererSettings()
Destructor.
Represents a mesh renderer settings for vector datasets displayed with arrows.
void setFixedShaftLength(double fixedShaftLength)
Sets fixed length (in millimeters)
void setMaxShaftLength(double maxShaftLength)
Sets maximum shaft length (in millimeters)
QgsMeshRendererVectorArrowSettings::ArrowScalingMethod shaftLengthMethod() const
Returns method used for drawing arrows.
void setMinShaftLength(double minShaftLength)
Sets mininimum shaft length (in millimeters)
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)
double scaleFactor() const
Returns scale factor.
double maxShaftLength() const
Returns maximum shaft length (in millimeters)
double arrowHeadWidthRatio() const
Returns ratio of the head width of the arrow (range 0-1)
void setArrowHeadLengthRatio(double arrowHeadLengthRatio)
Sets ratio of the head length of the arrow (range 0-1)
void readXml(const QDomElement &elem)
Reads configuration from the given DOM element.
void setScaleFactor(double scaleFactor)
Sets scale factor.
void setShaftLengthMethod(ArrowScalingMethod shaftLengthMethod)
Sets method used for drawing arrows.
ArrowScalingMethod
Algorithm how to transform vector magnitude to length of arrow on the device in pixels.
@ Scaled
Scale vector magnitude by factor scaleFactor()
@ MinMax
Scale vector magnitude linearly to fit in range of vectorFilterMin() and vectorFilterMax()
@ Fixed
Use fixed length fixedShaftLength() regardless of vector's magnitude.
double minShaftLength() const
Returns mininimum shaft length (in millimeters)
QDomElement writeXml(QDomDocument &doc) const
Writes configuration to a new DOM element.
double arrowHeadLengthRatio() const
Returns ratio of the head length of the arrow (range 0-1)
Represents a renderer settings for vector datasets.
void setColorRampShader(const QgsColorRampShader &colorRampShader)
Returns the color ramp shader used to render vector datasets.
void setStreamLinesSettings(const QgsMeshRendererVectorStreamlineSettings &streamLinesSettings)
Sets settings for vector rendered with streamlines.
int userGridCellWidth() const
Returns width in pixels of user grid cell.
void setArrowsSettings(const QgsMeshRendererVectorArrowSettings &arrowSettings)
Sets settings for vector rendered with arrows.
void setUserGridCellWidth(int width)
Sets width of user grid cell (in pixels)
void setColor(const QColor &color)
Sets color used for drawing arrows.
QgsMeshRendererVectorTracesSettings tracesSettings() const
Returns settings for vector rendered with traces.
QColor color() const
Returns color used for drawing arrows.
int userGridCellHeight() const
Returns height in pixels of user grid cell.
void setOnUserDefinedGrid(bool enabled)
Toggles drawing of vectors on user defined grid.
double lineWidth() const
Returns line width of the arrow (in millimeters)
Symbology
Defines the symbology of vector rendering.
void setUserGridCellHeight(int height)
Sets height of user grid cell (in pixels)
Symbology symbology() const
Returns the displaying method used to render vector datasets.
double filterMax() const
Returns filter value for vector magnitudes.
QgsColorRampShader colorRampShader() const
Sets the color ramp shader used to render vector datasets.
void setSymbology(const Symbology &symbology)
Sets the displaying method used to render vector datasets.
void setFilterMin(double filterMin)
Sets filter value for vector magnitudes.
QgsMeshRendererVectorArrowSettings arrowSettings() const
Returns settings for vector rendered with arrows.
void setFilterMax(double filterMax)
Sets filter value for vector magnitudes.
QgsInterpolatedLineColor vectorStrokeColoring() const
Returns the stroke coloring used to render vector datasets.
void setTracesSettings(const QgsMeshRendererVectorTracesSettings &tracesSettings)
Sets settings for vector rendered with traces.
QDomElement writeXml(QDomDocument &doc, const QgsReadWriteContext &context=QgsReadWriteContext()) const
Writes configuration to a new DOM element.
void setColoringMethod(const QgsInterpolatedLineColor::ColoringMethod &coloringMethod)
Sets the coloring method used to render vector datasets.
QgsInterpolatedLineColor::ColoringMethod coloringMethod() const
Returns the coloring method used to render vector datasets.
void readXml(const QDomElement &elem, const QgsReadWriteContext &context=QgsReadWriteContext())
Reads configuration from the given DOM element.
void setLineWidth(double lineWidth)
Sets line width of the arrow in pixels (in millimeters)
bool isOnUserDefinedGrid() const
Returns whether vectors are drawn on user-defined grid.
double filterMin() const
Returns filter value for vector magnitudes.
QgsMeshRendererVectorStreamlineSettings streamLinesSettings() const
Returns settings for vector rendered with streamlines.
Represents a streamline renderer settings for vector datasets displayed by streamlines.
void setSeedingDensity(double seedingDensity)
Sets the density used for seeding start points.
SeedingStartPointsMethod seedingMethod() const
Returns the method used for seeding start points of strealines.
void setSeedingMethod(const SeedingStartPointsMethod &seedingMethod)
Sets the method used for seeding start points of strealines.
QDomElement writeXml(QDomDocument &doc) const
Writes configuration to a new DOM element.
SeedingStartPointsMethod
Method used to define start points that are used to draw streamlines.
void readXml(const QDomElement &elem)
Reads configuration from the given DOM element.
double seedingDensity() const
Returns the density used for seeding start points.
Represents a trace renderer settings for vector datasets displayed by particle traces.
void setMaximumTailLength(double maximumTailLength)
Sets the maximums tail length.
QDomElement writeXml(QDomDocument &doc) const
Writes configuration to a new DOM element.
void readXml(const QDomElement &elem)
Reads configuration from the given DOM element.
double maximumTailLength() const
Returns the maximum tail length.
QgsUnitTypes::RenderUnit maximumTailLengthUnit() const
Returns the maximum tail length unit.
int particlesCount() const
Returns particles count.
void setParticlesCount(int value)
Sets particles count.
void setMaximumTailLengthUnit(const QgsUnitTypes::RenderUnit &maximumTailLengthUnit)
Sets the maximum tail length unit.
The class is used as a container of context for various read/write operations on other objects.
static QColor decodeColor(const QString &str)
static QString encodeColor(const QColor &color)
static Q_INVOKABLE QString encodeUnit(QgsUnitTypes::DistanceUnit unit)
Encodes a distance unit to a string.
static Q_INVOKABLE QgsUnitTypes::RenderUnit decodeRenderUnit(const QString &string, bool *ok=nullptr)
Decodes a render unit from a string.
RenderUnit
Rendering size units.