QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
qgsmeshrenderersettings.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  qgsmeshrenderersettings.cpp
3  ---------------------------
4  begin : May 2018
5  copyright : (C) 2018 by Peter Petrik
6  email : zilolv at gmail dot com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
19 #include "qgssymbollayerutils.h"
20 #include "qgsunittypes.h"
21 
23 {
24  return mEnabled;
25 }
26 
28 {
29  mEnabled = on;
30 }
31 
33 {
34  return mLineWidth;
35 }
36 
38 {
39  mLineWidth = lineWidth;
40 }
41 
43 {
44  return mColor;
45 }
46 
47 void QgsMeshRendererMeshSettings::setColor( const QColor &color )
48 {
49  mColor = color;
50 }
51 
53 {
54  return mLineWidthUnit;
55 }
56 
58 {
59  mLineWidthUnit = lineWidthUnit;
60 }
61 
62 QDomElement QgsMeshRendererMeshSettings::writeXml( QDomDocument &doc ) const
63 {
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 );
67  elem.setAttribute( QStringLiteral( "color" ), QgsSymbolLayerUtils::encodeColor( mColor ) );
68  elem.setAttribute( QStringLiteral( "line-width-unit" ), QgsUnitTypes::encodeUnit( mLineWidthUnit ) );
69  return elem;
70 }
71 
72 void QgsMeshRendererMeshSettings::readXml( const QDomElement &elem )
73 {
74  mEnabled = elem.attribute( QStringLiteral( "enabled" ) ).toInt();
75  mLineWidth = elem.attribute( QStringLiteral( "line-width" ) ).toDouble();
76  mColor = QgsSymbolLayerUtils::decodeColor( elem.attribute( QStringLiteral( "color" ) ) );
77  mLineWidthUnit = QgsUnitTypes::decodeRenderUnit( elem.attribute( QStringLiteral( "line-width-unit" ) ) );
78 }
79 // ---------------------------------------------------------------------
80 
82 {
83  return mColorRampShader;
84 }
85 
87 {
88  mColorRampShader = shader;
89 }
90 
91 double QgsMeshRendererScalarSettings::classificationMinimum() const { return mClassificationMinimum; }
92 
93 double QgsMeshRendererScalarSettings::classificationMaximum() const { return mClassificationMaximum; }
94 
96 {
97  mClassificationMinimum = minimum;
98  mClassificationMaximum = maximum;
99 }
100 
101 double QgsMeshRendererScalarSettings::opacity() const { return mOpacity; }
102 
103 void QgsMeshRendererScalarSettings::setOpacity( double opacity ) { mOpacity = opacity; }
104 
106 {
107  return mDataResamplingMethod;
108 }
109 
111 {
112  mDataResamplingMethod = dataInterpolationMethod;
113 }
114 
115 QDomElement QgsMeshRendererScalarSettings::writeXml( QDomDocument &doc, const QgsReadWriteContext &context ) const
116 {
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 );
121 
122  QString methodTxt;
123  switch ( mDataResamplingMethod )
124  {
125  case None:
126  methodTxt = QStringLiteral( "none" );
127  break;
128  case NeighbourAverage:
129  methodTxt = QStringLiteral( "neighbour-average" );
130  break;
131  }
132  elem.setAttribute( QStringLiteral( "interpolation-method" ), methodTxt );
133  const QDomElement elemShader = mColorRampShader.writeXml( doc, context );
134  elem.appendChild( elemShader );
135 
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 );
140 
141  return elem;
142 }
143 
144 void QgsMeshRendererScalarSettings::readXml( const QDomElement &elem, const QgsReadWriteContext &context )
145 {
146  mClassificationMinimum = elem.attribute( QStringLiteral( "min-val" ) ).toDouble();
147  mClassificationMaximum = elem.attribute( QStringLiteral( "max-val" ) ).toDouble();
148  mOpacity = elem.attribute( QStringLiteral( "opacity" ) ).toDouble();
149 
150  const QString methodTxt = elem.attribute( QStringLiteral( "interpolation-method" ) );
151  if ( QStringLiteral( "neighbour-average" ) == methodTxt )
152  {
153  mDataResamplingMethod = DataResamplingMethod::NeighbourAverage;
154  }
155  else
156  {
157  mDataResamplingMethod = DataResamplingMethod::None;
158  }
159  const QDomElement elemShader = elem.firstChildElement( QStringLiteral( "colorrampshader" ) );
160  mColorRampShader.readXml( elemShader, context );
161 
162  const QDomElement elemEdge = elem.firstChildElement( QStringLiteral( "edge-settings" ) );
163  const QDomElement elemEdgeStrokeWidth = elemEdge.firstChildElement( QStringLiteral( "mesh-stroke-width" ) );
164  mEdgeStrokeWidth.readXml( elemEdgeStrokeWidth, context );
165  mEdgeStrokeWidthUnit = static_cast<QgsUnitTypes::RenderUnit>(
166  elemEdge.attribute( QStringLiteral( "stroke-width-unit" ) ).toInt() );
167 }
168 
170 {
171  return mEdgeStrokeWidth;
172 }
173 
175 {
176  mEdgeStrokeWidth = strokeWidth;
177 }
178 
180 {
181  return mEdgeStrokeWidthUnit;
182 }
183 
185 {
186  mEdgeStrokeWidthUnit = edgeStrokeWidthUnit;
187 }
188 
189 // ---------------------------------------------------------------------
190 
192 {
193  return mLineWidth;
194 }
195 
197 {
198  mLineWidth = lineWidth;
199 }
200 
202 {
203  return mColor;
204 }
205 
206 void QgsMeshRendererVectorSettings::setColor( const QColor &vectorColor )
207 {
208  mColor = vectorColor;
209 }
210 
212 {
213  return mFilterMin;
214 }
215 
216 void QgsMeshRendererVectorSettings::setFilterMin( double vectorFilterMin )
217 {
218  mFilterMin = vectorFilterMin;
219 }
220 
222 {
223  return mFilterMax;
224 }
225 
226 void QgsMeshRendererVectorSettings::setFilterMax( double vectorFilterMax )
227 {
228  mFilterMax = vectorFilterMax;
229 }
230 
232 {
233  return mOnUserDefinedGrid;
234 }
235 
237 {
238  mOnUserDefinedGrid = enabled;
239 }
240 
242 {
243  return mUserGridCellWidth;
244 }
245 
247 {
248  mUserGridCellWidth = width;
249 }
250 
252 {
253  return mUserGridCellHeight;
254 }
255 
257 {
258  mUserGridCellHeight = height;
259 }
260 
262 {
263  return mShaftLengthMethod;
264 }
265 
267 {
268  mShaftLengthMethod = shaftLengthMethod;
269 }
270 
272 {
273  return mMinShaftLength;
274 }
275 
277 {
278  mMinShaftLength = minShaftLength;
279 }
280 
282 {
283  return mMaxShaftLength;
284 }
285 
287 {
288  mMaxShaftLength = maxShaftLength;
289 }
290 
292 {
293  return mScaleFactor;
294 }
295 
297 {
298  mScaleFactor = scaleFactor;
299 }
300 
302 {
303  return mFixedShaftLength;
304 }
305 
307 {
308  mFixedShaftLength = fixedShaftLength;
309 }
310 
312 {
313  return mArrowHeadWidthRatio;
314 }
315 
317 {
318  mArrowHeadWidthRatio = vectorHeadWidthRatio;
319 }
320 
322 {
323  return mArrowHeadLengthRatio;
324 }
325 
327 {
328  mArrowHeadLengthRatio = vectorHeadLengthRatio;
329 }
330 
331 QDomElement QgsMeshRendererVectorArrowSettings::writeXml( QDomDocument &doc ) const
332 {
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 );
336 
337  QDomElement elemShaft = doc.createElement( QStringLiteral( "shaft-length" ) );
338  QString methodTxt;
339  switch ( mShaftLengthMethod )
340  {
341  case MinMax:
342  methodTxt = QStringLiteral( "minmax" );
343  elemShaft.setAttribute( QStringLiteral( "min" ), mMinShaftLength );
344  elemShaft.setAttribute( QStringLiteral( "max" ), mMaxShaftLength );
345  break;
346  case Scaled:
347  methodTxt = QStringLiteral( "scaled" );
348  elemShaft.setAttribute( QStringLiteral( "scale-factor" ), mScaleFactor );
349  break;
350  case Fixed:
351  methodTxt = QStringLiteral( "fixed" ) ;
352  elemShaft.setAttribute( QStringLiteral( "fixed-length" ), mFixedShaftLength );
353  break;
354  }
355  elemShaft.setAttribute( QStringLiteral( "method" ), methodTxt );
356  elem.appendChild( elemShaft );
357  return elem;
358 }
359 
360 void QgsMeshRendererVectorArrowSettings::readXml( const QDomElement &elem )
361 {
362  mArrowHeadWidthRatio = elem.attribute( QStringLiteral( "arrow-head-width-ratio" ) ).toDouble();
363  mArrowHeadLengthRatio = elem.attribute( QStringLiteral( "arrow-head-length-ratio" ) ).toDouble();
364 
365  const QDomElement elemShaft = elem.firstChildElement( QStringLiteral( "shaft-length" ) );
366  const QString methodTxt = elemShaft.attribute( QStringLiteral( "method" ) );
367  if ( QStringLiteral( "minmax" ) == methodTxt )
368  {
369  mShaftLengthMethod = MinMax;
370  mMinShaftLength = elemShaft.attribute( QStringLiteral( "min" ) ).toDouble();
371  mMaxShaftLength = elemShaft.attribute( QStringLiteral( "max" ) ).toDouble();
372  }
373  else if ( QStringLiteral( "scaled" ) == methodTxt )
374  {
375  mShaftLengthMethod = Scaled;
376  mScaleFactor = elemShaft.attribute( QStringLiteral( "scale-factor" ) ).toDouble();
377  }
378  else // fixed
379  {
380  mShaftLengthMethod = Fixed;
381  mFixedShaftLength = elemShaft.attribute( QStringLiteral( "fixed-length" ) ).toDouble();
382  }
383 }
384 
385 // ---------------------------------------------------------------------
386 
388  : mAveragingMethod( new QgsMeshMultiLevelsAveragingMethod() )
389 {
390 }
391 
393 
395 {
396  return mAveragingMethod.get();
397 }
398 
400 {
401  if ( method )
402  mAveragingMethod.reset( method->clone() );
403  else
404  mAveragingMethod.reset();
405 }
406 
407 QDomElement QgsMeshRendererSettings::writeXml( QDomDocument &doc, const QgsReadWriteContext &context ) const
408 {
409  QDomElement elem = doc.createElement( QStringLiteral( "mesh-renderer-settings" ) );
410 
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 );
415 
416  for ( const int groupIndex : mRendererScalarSettings.keys() )
417  {
418  const QgsMeshRendererScalarSettings &scalarSettings = mRendererScalarSettings[groupIndex];
419  QDomElement elemScalar = scalarSettings.writeXml( doc, context );
420  elemScalar.setAttribute( QStringLiteral( "group" ), groupIndex );
421  elem.appendChild( elemScalar );
422  }
423 
424  for ( const int groupIndex : mRendererVectorSettings.keys() )
425  {
426  const QgsMeshRendererVectorSettings &vectorSettings = mRendererVectorSettings[groupIndex];
427  QDomElement elemVector = vectorSettings.writeXml( doc, context );
428  elemVector.setAttribute( QStringLiteral( "group" ), groupIndex );
429  elem.appendChild( elemVector );
430  }
431 
432  QDomElement elemNativeMesh = mRendererNativeMeshSettings.writeXml( doc );
433  elemNativeMesh.setTagName( QStringLiteral( "mesh-settings-native" ) );
434  elem.appendChild( elemNativeMesh );
435 
436  QDomElement elemEdgeMesh = mRendererEdgeMeshSettings.writeXml( doc );
437  elemEdgeMesh.setTagName( QStringLiteral( "mesh-settings-edge" ) );
438  elem.appendChild( elemEdgeMesh );
439 
440  QDomElement elemTriangularMesh = mRendererTriangularMeshSettings.writeXml( doc );
441  elemTriangularMesh.setTagName( QStringLiteral( "mesh-settings-triangular" ) );
442  elem.appendChild( elemTriangularMesh );
443 
444  if ( mAveragingMethod )
445  {
446  QDomElement elemAveraging = doc.createElement( QStringLiteral( "averaging-3d" ) );
447  elemAveraging.setAttribute( QStringLiteral( "method" ), QString::number( mAveragingMethod->method() ) ) ;
448  const QDomElement elemAveragingParams = mAveragingMethod->writeXml( doc );
449  elemAveraging.appendChild( elemAveragingParams );
450  elem.appendChild( elemAveraging );
451  }
452 
453  return elem;
454 }
455 
456 void QgsMeshRendererSettings::readXml( const QDomElement &elem, const QgsReadWriteContext &context )
457 {
458  mRendererScalarSettings.clear();
459  mRendererVectorSettings.clear();
460  mAveragingMethod.reset();
461 
462  const QDomElement elemActiveDataset = elem.firstChildElement( QStringLiteral( "active-dataset-group" ) );
463  if ( elemActiveDataset.hasAttribute( QStringLiteral( "scalar" ) ) )
464  mActiveScalarDatasetGroup = elemActiveDataset.attribute( QStringLiteral( "scalar" ) ).toInt();
465 
466  if ( elemActiveDataset.hasAttribute( QStringLiteral( "vector" ) ) )
467  mActiveVectorDatasetGroup = elemActiveDataset.attribute( QStringLiteral( "vector" ) ).toInt();
468 
469  QDomElement elemScalar = elem.firstChildElement( QStringLiteral( "scalar-settings" ) );
470  while ( !elemScalar.isNull() )
471  {
472  const int groupIndex = elemScalar.attribute( QStringLiteral( "group" ) ).toInt();
474  scalarSettings.readXml( elemScalar, context );
475  mRendererScalarSettings.insert( groupIndex, scalarSettings );
476 
477  elemScalar = elemScalar.nextSiblingElement( QStringLiteral( "scalar-settings" ) );
478  }
479 
480  QDomElement elemVector = elem.firstChildElement( QStringLiteral( "vector-settings" ) );
481  while ( !elemVector.isNull() )
482  {
483  const int groupIndex = elemVector.attribute( QStringLiteral( "group" ) ).toInt();
485  vectorSettings.readXml( elemVector, context );
486  mRendererVectorSettings.insert( groupIndex, vectorSettings );
487 
488  elemVector = elemVector.nextSiblingElement( QStringLiteral( "vector-settings" ) );
489  }
490 
491  const QDomElement elemNativeMesh = elem.firstChildElement( QStringLiteral( "mesh-settings-native" ) );
492  mRendererNativeMeshSettings.readXml( elemNativeMesh );
493 
494  const QDomElement elemEdgeMesh = elem.firstChildElement( QStringLiteral( "mesh-settings-edge" ) );
495  mRendererEdgeMeshSettings.readXml( elemEdgeMesh );
496 
497  const QDomElement elemTriangularMesh = elem.firstChildElement( QStringLiteral( "mesh-settings-triangular" ) );
498  mRendererTriangularMeshSettings.readXml( elemTriangularMesh );
499 
500  const QDomElement elemAveraging = elem.firstChildElement( QStringLiteral( "averaging-3d" ) );
501  if ( !elemAveraging.isNull() )
502  {
503  mAveragingMethod.reset( QgsMesh3dAveragingMethod::createFromXml( elemAveraging ) );
504  }
505 }
506 
508 {
509  return mActiveScalarDatasetGroup;
510 }
511 
512 void QgsMeshRendererSettings::setActiveScalarDatasetGroup( int activeScalarDatasetGroup )
513 {
514  mActiveScalarDatasetGroup = activeScalarDatasetGroup;
515 }
516 
518 {
519  return mActiveVectorDatasetGroup;
520 }
521 
522 void QgsMeshRendererSettings::setActiveVectorDatasetGroup( int activeVectorDatasetGroup )
523 {
524  mActiveVectorDatasetGroup = activeVectorDatasetGroup;
525 }
526 
528 {
529  return mSeedingMethod;
530 }
531 
533 {
534  mSeedingMethod = seedingMethod;
535 }
536 
538 {
539  return mSeedingDensity;
540 }
541 
543 {
544  mSeedingDensity = seedingDensity;
545 }
546 
547 QDomElement QgsMeshRendererVectorStreamlineSettings::writeXml( QDomDocument &doc ) const
548 {
549  QDomElement elem = doc.createElement( QStringLiteral( "vector-streamline-settings" ) );
550 
551  elem.setAttribute( QStringLiteral( "seeding-method" ), mSeedingMethod );
552  elem.setAttribute( QStringLiteral( "seeding-density" ), mSeedingDensity );
553 
554  return elem;
555 }
556 
558 {
559  mSeedingMethod =
561  elem.attribute( QStringLiteral( "seeding-method" ) ).toInt() );
562  mSeedingDensity = elem.attribute( QStringLiteral( "seeding-density" ) ).toDouble();
563 }
564 
566 {
567  return mDisplayingMethod;
568 }
569 
571 {
572  mDisplayingMethod = displayingMethod;
573 }
574 
576 {
577  return mArrowsSettings;
578 }
579 
581 {
582  mArrowsSettings = arrowSettings;
583 }
584 
586 {
587  return mStreamLinesSettings;
588 }
589 
591 {
592  mStreamLinesSettings = streamLinesSettings;
593 }
594 
595 QDomElement QgsMeshRendererVectorSettings::writeXml( QDomDocument &doc, const QgsReadWriteContext &context ) const
596 {
597  QDomElement elem = doc.createElement( QStringLiteral( "vector-settings" ) );
598  elem.setAttribute( QStringLiteral( "symbology" ), mDisplayingMethod );
599 
600  elem.setAttribute( QStringLiteral( "line-width" ), mLineWidth );
601  elem.setAttribute( QStringLiteral( "coloring-method" ), coloringMethod() );
602  elem.setAttribute( QStringLiteral( "color" ), QgsSymbolLayerUtils::encodeColor( mColor ) );
603  const QDomElement elemShader = mColorRampShader.writeXml( doc, context );
604  elem.appendChild( elemShader );
605  elem.setAttribute( QStringLiteral( "filter-min" ), mFilterMin );
606  elem.setAttribute( QStringLiteral( "filter-max" ), mFilterMax );
607 
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 );
611 
612  elem.appendChild( mArrowsSettings.writeXml( doc ) );
613  elem.appendChild( mStreamLinesSettings.writeXml( doc ) );
614  elem.appendChild( mTracesSettings.writeXml( doc ) );
615 
616  return elem;
617 }
618 
619 void QgsMeshRendererVectorSettings::readXml( const QDomElement &elem, const QgsReadWriteContext &context )
620 {
621  mDisplayingMethod = static_cast<QgsMeshRendererVectorSettings::Symbology>(
622  elem.attribute( QStringLiteral( "symbology" ) ).toInt() );
623 
624  mLineWidth = elem.attribute( QStringLiteral( "line-width" ) ).toDouble();
625  mColoringMethod = static_cast<QgsInterpolatedLineColor::ColoringMethod>(
626  elem.attribute( QStringLiteral( "coloring-method" ) ).toInt() );
627  mColor = QgsSymbolLayerUtils::decodeColor( elem.attribute( QStringLiteral( "color" ) ) );
628  mColorRampShader.readXml( elem.firstChildElement( "colorrampshader" ), context );
629  mFilterMin = elem.attribute( QStringLiteral( "filter-min" ) ).toDouble();
630  mFilterMax = elem.attribute( QStringLiteral( "filter-max" ) ).toDouble();
631 
632  mOnUserDefinedGrid = elem.attribute( QStringLiteral( "user-grid-enabled" ) ).toInt(); //bool
633  mUserGridCellWidth = elem.attribute( QStringLiteral( "user-grid-width" ) ).toInt();
634  mUserGridCellHeight = elem.attribute( QStringLiteral( "user-grid-height" ) ).toInt();
635 
636  const QDomElement elemVector = elem.firstChildElement( QStringLiteral( "vector-arrow-settings" ) );
637  if ( ! elemVector.isNull() )
638  mArrowsSettings.readXml( elemVector );
639 
640  const QDomElement elemStreamLine = elem.firstChildElement( QStringLiteral( "vector-streamline-settings" ) );
641  if ( ! elemStreamLine.isNull() )
642  mStreamLinesSettings.readXml( elemStreamLine );
643 
644  const QDomElement elemTraces = elem.firstChildElement( QStringLiteral( "vector-traces-settings" ) );
645  if ( ! elemTraces.isNull() )
646  mTracesSettings.readXml( elemTraces );
647 }
648 
650 {
651  return mColoringMethod;
652 }
653 
655 {
656  mColoringMethod = coloringMethod;
657 }
658 
660 {
661  return mColorRampShader;
662 }
663 
665 {
666  mColorRampShader = colorRampShader;
667 }
668 
670 {
671  QgsInterpolatedLineColor strokeColoring;
672  switch ( mColoringMethod )
673  {
675  strokeColoring = QgsInterpolatedLineColor( mColor );
676  break;
678  strokeColoring = QgsInterpolatedLineColor( mColorRampShader );
679  break;
680  }
681 
682  return strokeColoring;
683 }
684 
686 {
687  return mTracesSettings;
688 }
689 
691 {
692  mTracesSettings = tracesSettings;
693 }
694 
695 void QgsMeshRendererVectorTracesSettings::readXml( const QDomElement &elem )
696 {
697  mMaximumTailLength = elem.attribute( QStringLiteral( "maximum-tail-length" ) ).toInt();
698  mMaximumTailLengthUnit = static_cast<QgsUnitTypes::RenderUnit>(
699  elem.attribute( QStringLiteral( "maximum-tail-length-unit" ) ).toInt() );
700  mParticlesCount = elem.attribute( QStringLiteral( "particles-count" ) ).toInt();
701 }
702 
703 QDomElement QgsMeshRendererVectorTracesSettings::writeXml( QDomDocument &doc ) const
704 {
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 );
709 
710  return elem;
711 }
712 
714 {
715  return mMaximumTailLengthUnit;
716 }
717 
719 {
720  mMaximumTailLengthUnit = maximumTailLengthUnit;
721 }
722 
724 {
725  return mMaximumTailLength;
726 }
727 
729 {
730  mMaximumTailLength = maximumTailLength;
731 }
732 
734 {
735  return mParticlesCount;
736 }
737 
739 {
740  mParticlesCount = value;
741 }
742 
743 bool QgsMeshRendererSettings::hasSettings( int datasetGroupIndex ) const
744 {
745  return mRendererScalarSettings.contains( datasetGroupIndex ) || mRendererVectorSettings.contains( datasetGroupIndex );
746 }
QgsMeshRendererVectorSettings
Represents a renderer settings for vector datasets.
Definition: qgsmeshrenderersettings.h:410
QgsMeshRendererVectorStreamlineSettings::SeedingStartPointsMethod
SeedingStartPointsMethod
Method used to define start points that are used to draw streamlines.
Definition: qgsmeshrenderersettings.h:328
QgsInterpolatedLineWidth::readXml
void readXml(const QDomElement &elem, const QgsReadWriteContext &context)
Reads configuration from the given DOM element.
Definition: qgsinterpolatedlinerenderer.cpp:376
QgsMeshRendererVectorSettings::symbology
Symbology symbology() const
Returns the displaying method used to render vector datasets.
Definition: qgsmeshrenderersettings.cpp:565
QgsSymbolLayerUtils::encodeColor
static QString encodeColor(const QColor &color)
Definition: qgssymbollayerutils.cpp:64
QgsMeshRendererScalarSettings::setClassificationMinimumMaximum
void setClassificationMinimumMaximum(double minimum, double maximum)
Sets min/max values used for creation of the color ramp shader.
Definition: qgsmeshrenderersettings.cpp:95
QgsMeshRendererVectorArrowSettings::Fixed
@ Fixed
Use fixed length fixedShaftLength() regardless of vector's magnitude.
Definition: qgsmeshrenderersettings.h:226
QgsMeshRendererScalarSettings::dataResamplingMethod
DataResamplingMethod dataResamplingMethod() const
Returns the type of interpolation to use to convert face defined datasets to values on vertices.
Definition: qgsmeshrenderersettings.cpp:105
QgsMeshRendererVectorSettings::readXml
void readXml(const QDomElement &elem, const QgsReadWriteContext &context=QgsReadWriteContext())
Reads configuration from the given DOM element.
Definition: qgsmeshrenderersettings.cpp:619
QgsUnitTypes::RenderUnit
RenderUnit
Rendering size units.
Definition: qgsunittypes.h:167
QgsMeshRendererVectorArrowSettings::arrowHeadWidthRatio
double arrowHeadWidthRatio() const
Returns ratio of the head width of the arrow (range 0-1)
Definition: qgsmeshrenderersettings.cpp:311
QgsMeshRendererVectorSettings::arrowSettings
QgsMeshRendererVectorArrowSettings arrowSettings() const
Returns settings for vector rendered with arrows.
Definition: qgsmeshrenderersettings.cpp:575
QgsMeshRendererVectorSettings::setFilterMin
void setFilterMin(double filterMin)
Sets filter value for vector magnitudes.
Definition: qgsmeshrenderersettings.cpp:216
QgsReadWriteContext
The class is used as a container of context for various read/write operations on other objects.
Definition: qgsreadwritecontext.h:34
QgsMeshRendererSettings::setActiveVectorDatasetGroup
void setActiveVectorDatasetGroup(int activeVectorDatasetGroup)
Sets the active vector dataset group.
Definition: qgsmeshrenderersettings.cpp:522
QgsMeshRendererVectorArrowSettings::setArrowHeadLengthRatio
void setArrowHeadLengthRatio(double arrowHeadLengthRatio)
Sets ratio of the head length of the arrow (range 0-1)
Definition: qgsmeshrenderersettings.cpp:326
QgsInterpolatedLineColor::SingleColor
@ SingleColor
Render with a single color.
Definition: qgsinterpolatedlinerenderer.h:48
QgsMeshRendererMeshSettings::color
QColor color() const
Returns color used for rendering.
Definition: qgsmeshrenderersettings.cpp:42
QgsMeshRendererScalarSettings::classificationMinimum
double classificationMinimum() const
Returns min value used for creation of the color ramp shader.
Definition: qgsmeshrenderersettings.cpp:91
QgsMeshRendererSettings::setAveragingMethod
void setAveragingMethod(QgsMesh3dAveragingMethod *method)
Sets averaging method for conversion of 3d stacked mesh data to 2d data.
Definition: qgsmeshrenderersettings.cpp:399
QgsMeshRendererMeshSettings::lineWidthUnit
QgsUnitTypes::RenderUnit lineWidthUnit() const
Returns units of the width of the mesh frame.
Definition: qgsmeshrenderersettings.cpp:52
QgsMeshRendererMeshSettings::lineWidth
double lineWidth() const
Returns line width used for rendering (in millimeters)
Definition: qgsmeshrenderersettings.cpp:32
QgsMeshMultiLevelsAveragingMethod
Multi level averaging method specifies limits of vertical layers from the top layer down or reversed.
Definition: qgsmesh3daveraging.h:158
qgssymbollayerutils.h
QgsInterpolatedLineColor::ColoringMethod
ColoringMethod
Defines how the color is defined.
Definition: qgsinterpolatedlinerenderer.h:45
QgsMeshRendererMeshSettings::setColor
void setColor(const QColor &color)
Sets color used for rendering of the mesh.
Definition: qgsmeshrenderersettings.cpp:47
QgsMeshRendererVectorStreamlineSettings::setSeedingMethod
void setSeedingMethod(const SeedingStartPointsMethod &seedingMethod)
Sets the method used for seeding start points of strealines.
Definition: qgsmeshrenderersettings.cpp:532
QgsMeshRendererVectorArrowSettings::setShaftLengthMethod
void setShaftLengthMethod(ArrowScalingMethod shaftLengthMethod)
Sets method used for drawing arrows.
Definition: qgsmeshrenderersettings.cpp:266
QgsMeshRendererVectorSettings::setUserGridCellHeight
void setUserGridCellHeight(int height)
Sets height of user grid cell (in pixels)
Definition: qgsmeshrenderersettings.cpp:256
QgsMeshRendererVectorStreamlineSettings::writeXml
QDomElement writeXml(QDomDocument &doc) const
Writes configuration to a new DOM element.
Definition: qgsmeshrenderersettings.cpp:547
qgsunittypes.h
QgsMeshRendererVectorSettings::writeXml
QDomElement writeXml(QDomDocument &doc, const QgsReadWriteContext &context=QgsReadWriteContext()) const
Writes configuration to a new DOM element.
Definition: qgsmeshrenderersettings.cpp:595
QgsMeshRendererVectorTracesSettings::readXml
void readXml(const QDomElement &elem)
Reads configuration from the given DOM element.
Definition: qgsmeshrenderersettings.cpp:695
QgsMeshRendererVectorArrowSettings::ArrowScalingMethod
ArrowScalingMethod
Algorithm how to transform vector magnitude to length of arrow on the device in pixels.
Definition: qgsmeshrenderersettings.h:210
QgsMeshRendererVectorSettings::tracesSettings
QgsMeshRendererVectorTracesSettings tracesSettings() const
Returns settings for vector rendered with traces.
Definition: qgsmeshrenderersettings.cpp:685
QgsMeshRendererVectorArrowSettings::setFixedShaftLength
void setFixedShaftLength(double fixedShaftLength)
Sets fixed length (in millimeters)
Definition: qgsmeshrenderersettings.cpp:306
QgsSymbolLayerUtils::decodeColor
static QColor decodeColor(const QString &str)
Definition: qgssymbollayerutils.cpp:69
QgsColorRampShader
A ramp shader will color a raster pixel based on a list of values ranges in a ramp.
Definition: qgscolorrampshader.h:42
QgsMeshRendererVectorStreamlineSettings::readXml
void readXml(const QDomElement &elem)
Reads configuration from the given DOM element.
Definition: qgsmeshrenderersettings.cpp:557
QgsMeshRendererScalarSettings::setEdgeStrokeWidth
void setEdgeStrokeWidth(const QgsInterpolatedLineWidth &strokeWidth)
Sets the stroke width used to render edges scalar dataset.
Definition: qgsmeshrenderersettings.cpp:174
QgsInterpolatedLineWidth::writeXml
QDomElement writeXml(QDomDocument &doc, const QgsReadWriteContext &context) const
Writes configuration to a new DOM element.
Definition: qgsinterpolatedlinerenderer.cpp:360
QgsMeshRendererVectorStreamlineSettings::setSeedingDensity
void setSeedingDensity(double seedingDensity)
Sets the density used for seeding start points.
Definition: qgsmeshrenderersettings.cpp:542
QgsUnitTypes::decodeRenderUnit
static Q_INVOKABLE QgsUnitTypes::RenderUnit decodeRenderUnit(const QString &string, bool *ok=nullptr)
Decodes a render unit from a string.
Definition: qgsunittypes.cpp:2948
QgsMeshRendererVectorSettings::vectorStrokeColoring
QgsInterpolatedLineColor vectorStrokeColoring() const
Returns the stroke coloring used to render vector datasets.
Definition: qgsmeshrenderersettings.cpp:669
QgsMeshRendererSettings::writeXml
QDomElement writeXml(QDomDocument &doc, const QgsReadWriteContext &context=QgsReadWriteContext()) const
Writes configuration to a new DOM element.
Definition: qgsmeshrenderersettings.cpp:407
QgsMeshRendererScalarSettings::NeighbourAverage
@ NeighbourAverage
Does a simple average of values defined for all surrounding faces/vertices.
Definition: qgsmeshrenderersettings.h:116
QgsMeshRendererMeshSettings::setLineWidth
void setLineWidth(double lineWidth)
Sets line width used for rendering (in millimeters)
Definition: qgsmeshrenderersettings.cpp:37
QgsMeshRendererVectorSettings::setColoringMethod
void setColoringMethod(const QgsInterpolatedLineColor::ColoringMethod &coloringMethod)
Sets the coloring method used to render vector datasets.
Definition: qgsmeshrenderersettings.cpp:654
QgsInterpolatedLineColor::ColorRamp
@ ColorRamp
Render with a color ramp.
Definition: qgsinterpolatedlinerenderer.h:50
QgsMeshRendererVectorSettings::filterMin
double filterMin() const
Returns filter value for vector magnitudes.
Definition: qgsmeshrenderersettings.cpp:211
QgsMeshRendererScalarSettings::writeXml
QDomElement writeXml(QDomDocument &doc, const QgsReadWriteContext &context=QgsReadWriteContext()) const
Writes configuration to a new DOM element.
Definition: qgsmeshrenderersettings.cpp:115
QgsMeshRendererVectorTracesSettings::particlesCount
int particlesCount() const
Returns particles count.
Definition: qgsmeshrenderersettings.cpp:733
QgsMeshRendererScalarSettings::opacity
double opacity() const
Returns opacity.
Definition: qgsmeshrenderersettings.cpp:101
QgsMeshRendererSettings::activeScalarDatasetGroup
int activeScalarDatasetGroup() const
Returns the active scalar dataset group.
Definition: qgsmeshrenderersettings.cpp:507
QgsMeshRendererSettings::~QgsMeshRendererSettings
~QgsMeshRendererSettings()
Destructor.
QgsUnitTypes::encodeUnit
static Q_INVOKABLE QString encodeUnit(QgsUnitTypes::DistanceUnit unit)
Encodes a distance unit to a string.
Definition: qgsunittypes.cpp:122
QgsMeshRendererVectorSettings::setOnUserDefinedGrid
void setOnUserDefinedGrid(bool enabled)
Toggles drawing of vectors on user defined grid.
Definition: qgsmeshrenderersettings.cpp:236
QgsMeshRendererVectorSettings::setSymbology
void setSymbology(const Symbology &symbology)
Sets the displaying method used to render vector datasets.
Definition: qgsmeshrenderersettings.cpp:570
QgsMeshRendererSettings::scalarSettings
QgsMeshRendererScalarSettings scalarSettings(int groupIndex) const
Returns renderer settings.
Definition: qgsmeshrenderersettings.h:624
QgsInterpolatedLineWidth
Represents a width than can vary depending on values.
Definition: qgsinterpolatedlinerenderer.h:126
QgsColorRampShader::writeXml
QDomElement writeXml(QDomDocument &doc, const QgsReadWriteContext &context=QgsReadWriteContext()) const
Writes configuration to a new DOM element.
Definition: qgscolorrampshader.cpp:563
QgsMeshRendererScalarSettings::colorRampShader
QgsColorRampShader colorRampShader() const
Returns color ramp shader function.
Definition: qgsmeshrenderersettings.cpp:81
QgsMeshRendererSettings::activeVectorDatasetGroup
int activeVectorDatasetGroup() const
Returns the active vector dataset group.
Definition: qgsmeshrenderersettings.cpp:517
QgsMeshRendererVectorArrowSettings::Scaled
@ Scaled
Scale vector magnitude by factor scaleFactor()
Definition: qgsmeshrenderersettings.h:221
QgsMeshRendererVectorSettings::setArrowsSettings
void setArrowsSettings(const QgsMeshRendererVectorArrowSettings &arrowSettings)
Sets settings for vector rendered with arrows.
Definition: qgsmeshrenderersettings.cpp:580
QgsMeshRendererVectorTracesSettings::setParticlesCount
void setParticlesCount(int value)
Sets particles count.
Definition: qgsmeshrenderersettings.cpp:738
QgsMeshRendererSettings::QgsMeshRendererSettings
QgsMeshRendererSettings()
Constructs renderer with default single layer averaging method.
Definition: qgsmeshrenderersettings.cpp:387
QgsMeshRendererVectorTracesSettings::maximumTailLength
double maximumTailLength() const
Returns the maximum tail length.
Definition: qgsmeshrenderersettings.cpp:723
QgsInterpolatedLineColor
Class defining color to render mesh datasets. The color can vary depending on the dataset value.
Definition: qgsinterpolatedlinerenderer.h:38
QgsMeshRendererVectorSettings::setColor
void setColor(const QColor &color)
Sets color used for drawing arrows.
Definition: qgsmeshrenderersettings.cpp:206
QgsMeshRendererScalarSettings::None
@ None
Does not use resampling.
Definition: qgsmeshrenderersettings.h:111
QgsMeshRendererVectorSettings::setStreamLinesSettings
void setStreamLinesSettings(const QgsMeshRendererVectorStreamlineSettings &streamLinesSettings)
Sets settings for vector rendered with streamlines.
Definition: qgsmeshrenderersettings.cpp:590
QgsMeshRendererVectorSettings::setLineWidth
void setLineWidth(double lineWidth)
Sets line width of the arrow in pixels (in millimeters)
Definition: qgsmeshrenderersettings.cpp:196
QgsMeshRendererVectorStreamlineSettings::seedingDensity
double seedingDensity() const
Returns the density used for seeding start points.
Definition: qgsmeshrenderersettings.cpp:537
QgsMeshRendererScalarSettings::DataResamplingMethod
DataResamplingMethod
Resampling of value from dataset.
Definition: qgsmeshrenderersettings.h:105
QgsMeshRendererVectorArrowSettings::setMaxShaftLength
void setMaxShaftLength(double maxShaftLength)
Sets maximum shaft length (in millimeters)
Definition: qgsmeshrenderersettings.cpp:286
QgsMeshRendererVectorArrowSettings::fixedShaftLength
double fixedShaftLength() const
Returns fixed arrow length (in millimeters)
Definition: qgsmeshrenderersettings.cpp:301
QgsMeshRendererVectorArrowSettings::writeXml
QDomElement writeXml(QDomDocument &doc) const
Writes configuration to a new DOM element.
Definition: qgsmeshrenderersettings.cpp:331
QgsMeshRendererScalarSettings::setColorRampShader
void setColorRampShader(const QgsColorRampShader &shader)
Sets color ramp shader function.
Definition: qgsmeshrenderersettings.cpp:86
QgsMeshRendererVectorSettings::color
QColor color() const
Returns color used for drawing arrows.
Definition: qgsmeshrenderersettings.cpp:201
QgsMeshRendererVectorArrowSettings::setMinShaftLength
void setMinShaftLength(double minShaftLength)
Sets mininimum shaft length (in millimeters)
Definition: qgsmeshrenderersettings.cpp:276
QgsMeshRendererMeshSettings::setLineWidthUnit
void setLineWidthUnit(const QgsUnitTypes::RenderUnit &lineWidthUnit)
Sets units of the width of the mesh frame.
Definition: qgsmeshrenderersettings.cpp:57
QgsMesh3dAveragingMethod
Abstract class to interpolate 3d stacked mesh data to 2d data.
Definition: qgsmesh3daveraging.h:39
QgsMeshRendererScalarSettings::setOpacity
void setOpacity(double opacity)
Sets opacity.
Definition: qgsmeshrenderersettings.cpp:103
QgsMeshRendererVectorArrowSettings::shaftLengthMethod
QgsMeshRendererVectorArrowSettings::ArrowScalingMethod shaftLengthMethod() const
Returns method used for drawing arrows.
Definition: qgsmeshrenderersettings.cpp:261
qgsmeshrenderersettings.h
QgsMeshRendererScalarSettings::edgeStrokeWidthUnit
QgsUnitTypes::RenderUnit edgeStrokeWidthUnit() const
Returns the stroke width unit used to render edges scalar dataset.
Definition: qgsmeshrenderersettings.cpp:179
QgsMeshRendererVectorSettings::setTracesSettings
void setTracesSettings(const QgsMeshRendererVectorTracesSettings &tracesSettings)
Sets settings for vector rendered with traces.
Definition: qgsmeshrenderersettings.cpp:690
QgsMeshRendererVectorSettings::filterMax
double filterMax() const
Returns filter value for vector magnitudes.
Definition: qgsmeshrenderersettings.cpp:221
QgsMeshRendererVectorSettings::userGridCellHeight
int userGridCellHeight() const
Returns height in pixels of user grid cell.
Definition: qgsmeshrenderersettings.cpp:251
QgsMeshRendererVectorTracesSettings::maximumTailLengthUnit
QgsUnitTypes::RenderUnit maximumTailLengthUnit() const
Returns the maximum tail length unit.
Definition: qgsmeshrenderersettings.cpp:713
QgsMeshRendererScalarSettings
Represents a mesh renderer settings for scalar datasets.
Definition: qgsmeshrenderersettings.h:94
QgsMeshRendererSettings::vectorSettings
QgsMeshRendererVectorSettings vectorSettings(int groupIndex) const
Returns renderer settings.
Definition: qgsmeshrenderersettings.h:629
QgsMeshRendererVectorSettings::setColorRampShader
void setColorRampShader(const QgsColorRampShader &colorRampShader)
Returns the color ramp shader used to render vector datasets.
Definition: qgsmeshrenderersettings.cpp:664
QgsMeshRendererMeshSettings::readXml
void readXml(const QDomElement &elem)
Reads configuration from the given DOM element.
Definition: qgsmeshrenderersettings.cpp:72
QgsMeshRendererVectorSettings::coloringMethod
QgsInterpolatedLineColor::ColoringMethod coloringMethod() const
Returns the coloring method used to render vector datasets.
Definition: qgsmeshrenderersettings.cpp:649
QgsMeshRendererVectorSettings::Symbology
Symbology
Defines the symbology of vector rendering.
Definition: qgsmeshrenderersettings.h:418
QgsMeshRendererScalarSettings::setDataResamplingMethod
void setDataResamplingMethod(const DataResamplingMethod &dataResamplingMethod)
Sets data interpolation method.
Definition: qgsmeshrenderersettings.cpp:110
QgsMeshRendererVectorArrowSettings
Represents a mesh renderer settings for vector datasets displayed with arrows.
Definition: qgsmeshrenderersettings.h:205
QgsMeshRendererMeshSettings::isEnabled
bool isEnabled() const
Returns whether mesh structure rendering is enabled.
Definition: qgsmeshrenderersettings.cpp:22
QgsMeshRendererVectorArrowSettings::maxShaftLength
double maxShaftLength() const
Returns maximum shaft length (in millimeters)
Definition: qgsmeshrenderersettings.cpp:281
QgsColorRampShader::readXml
void readXml(const QDomElement &elem, const QgsReadWriteContext &context=QgsReadWriteContext())
Reads configuration from the given DOM element.
Definition: qgscolorrampshader.cpp:599
QgsMeshRendererVectorArrowSettings::MinMax
@ MinMax
Scale vector magnitude linearly to fit in range of vectorFilterMin() and vectorFilterMax()
Definition: qgsmeshrenderersettings.h:216
QgsMeshRendererMeshSettings::writeXml
QDomElement writeXml(QDomDocument &doc) const
Writes configuration to a new DOM element.
Definition: qgsmeshrenderersettings.cpp:62
QgsMeshRendererVectorStreamlineSettings
Represents a streamline renderer settings for vector datasets displayed by streamlines.
Definition: qgsmeshrenderersettings.h:324
QgsMeshRendererSettings::readXml
void readXml(const QDomElement &elem, const QgsReadWriteContext &context=QgsReadWriteContext())
Reads configuration from the given DOM element.
Definition: qgsmeshrenderersettings.cpp:456
QgsMeshRendererMeshSettings::setEnabled
void setEnabled(bool enabled)
Sets whether mesh structure rendering is enabled.
Definition: qgsmeshrenderersettings.cpp:27
QgsMeshRendererSettings::averagingMethod
QgsMesh3dAveragingMethod * averagingMethod() const
Returns averaging method for conversion of 3d stacked mesh data to 2d data.
Definition: qgsmeshrenderersettings.cpp:394
QgsMeshRendererVectorArrowSettings::setScaleFactor
void setScaleFactor(double scaleFactor)
Sets scale factor.
Definition: qgsmeshrenderersettings.cpp:296
QgsMeshRendererVectorArrowSettings::scaleFactor
double scaleFactor() const
Returns scale factor.
Definition: qgsmeshrenderersettings.cpp:291
QgsMeshRendererVectorSettings::colorRampShader
QgsColorRampShader colorRampShader() const
Sets the color ramp shader used to render vector datasets.
Definition: qgsmeshrenderersettings.cpp:659
QgsMeshRendererVectorTracesSettings::setMaximumTailLengthUnit
void setMaximumTailLengthUnit(const QgsUnitTypes::RenderUnit &maximumTailLengthUnit)
Sets the maximum tail length unit.
Definition: qgsmeshrenderersettings.cpp:718
QgsMeshRendererVectorTracesSettings::setMaximumTailLength
void setMaximumTailLength(double maximumTailLength)
Sets the maximums tail length.
Definition: qgsmeshrenderersettings.cpp:728
QgsMeshRendererVectorTracesSettings::writeXml
QDomElement writeXml(QDomDocument &doc) const
Writes configuration to a new DOM element.
Definition: qgsmeshrenderersettings.cpp:703
QgsMeshRendererVectorSettings::userGridCellWidth
int userGridCellWidth() const
Returns width in pixels of user grid cell.
Definition: qgsmeshrenderersettings.cpp:241
QgsMeshRendererVectorSettings::isOnUserDefinedGrid
bool isOnUserDefinedGrid() const
Returns whether vectors are drawn on user-defined grid.
Definition: qgsmeshrenderersettings.cpp:231
QgsMeshRendererScalarSettings::readXml
void readXml(const QDomElement &elem, const QgsReadWriteContext &context=QgsReadWriteContext())
Reads configuration from the given DOM element.
Definition: qgsmeshrenderersettings.cpp:144
QgsMeshRendererVectorArrowSettings::arrowHeadLengthRatio
double arrowHeadLengthRatio() const
Returns ratio of the head length of the arrow (range 0-1)
Definition: qgsmeshrenderersettings.cpp:321
QgsMeshRendererVectorStreamlineSettings::seedingMethod
SeedingStartPointsMethod seedingMethod() const
Returns the method used for seeding start points of strealines.
Definition: qgsmeshrenderersettings.cpp:527
QgsMeshRendererVectorArrowSettings::minShaftLength
double minShaftLength() const
Returns mininimum shaft length (in millimeters)
Definition: qgsmeshrenderersettings.cpp:271
QgsMeshRendererScalarSettings::edgeStrokeWidth
QgsInterpolatedLineWidth edgeStrokeWidth() const
Returns the stroke width used to render edges scalar dataset.
Definition: qgsmeshrenderersettings.cpp:169
QgsMeshRendererVectorSettings::streamLinesSettings
QgsMeshRendererVectorStreamlineSettings streamLinesSettings() const
Returns settings for vector rendered with streamlines.
Definition: qgsmeshrenderersettings.cpp:585
QgsMeshRendererScalarSettings::classificationMaximum
double classificationMaximum() const
Returns max value used for creation of the color ramp shader.
Definition: qgsmeshrenderersettings.cpp:93
QgsMeshRendererVectorArrowSettings::setArrowHeadWidthRatio
void setArrowHeadWidthRatio(double arrowHeadWidthRatio)
Sets ratio of the head width of the arrow (range 0-1)
Definition: qgsmeshrenderersettings.cpp:316
QgsMesh3dAveragingMethod::createFromXml
static QgsMesh3dAveragingMethod * createFromXml(const QDomElement &elem)
Creates the instance from XML by calling readXml of derived classes.
Definition: qgsmesh3daveraging.cpp:33
QgsMeshRendererVectorSettings::lineWidth
double lineWidth() const
Returns line width of the arrow (in millimeters)
Definition: qgsmeshrenderersettings.cpp:191
QgsMeshRendererVectorSettings::setFilterMax
void setFilterMax(double filterMax)
Sets filter value for vector magnitudes.
Definition: qgsmeshrenderersettings.cpp:226
QgsMeshRendererVectorArrowSettings::readXml
void readXml(const QDomElement &elem)
Reads configuration from the given DOM element.
Definition: qgsmeshrenderersettings.cpp:360
QgsMeshRendererVectorTracesSettings
Represents a trace renderer settings for vector datasets displayed by particle traces.
Definition: qgsmeshrenderersettings.h:370
QgsMesh3dAveragingMethod::clone
virtual QgsMesh3dAveragingMethod * clone() const =0
Clone the instance.
QgsMeshRendererSettings::setActiveScalarDatasetGroup
void setActiveScalarDatasetGroup(int activeScalarDatasetGroup)
Sets the active scalar dataset group.
Definition: qgsmeshrenderersettings.cpp:512
QgsMeshRendererVectorSettings::setUserGridCellWidth
void setUserGridCellWidth(int width)
Sets width of user grid cell (in pixels)
Definition: qgsmeshrenderersettings.cpp:246
QgsMeshRendererSettings::hasSettings
bool hasSettings(int datasetGroupIndex) const
Returns whether the group with index has render settings (scalar or vector)
Definition: qgsmeshrenderersettings.cpp:743
QgsMeshRendererScalarSettings::setEdgeStrokeWidthUnit
void setEdgeStrokeWidthUnit(const QgsUnitTypes::RenderUnit &edgeStrokeWidthUnit)
Sets the stroke width unit used to render edges scalar dataset.
Definition: qgsmeshrenderersettings.cpp:184