18 #ifndef QGSMESHRENDERERSETTINGS_H 19 #define QGSMESHRENDERERSETTINGS_H 24 #include "qgis_core.h" 43 bool isEnabled()
const;
45 void setEnabled(
bool enabled );
48 double lineWidth()
const;
50 void setLineWidth(
double lineWidth );
55 void setColor(
const QColor &color );
58 QDomElement writeXml( QDomDocument &doc )
const;
60 void readXml(
const QDomElement &elem );
63 bool mEnabled =
false;
65 QColor mColor = Qt::black;
86 double classificationMinimum()
const;
88 double classificationMaximum()
const;
90 void setClassificationMinimumMaximum(
double minimum,
double maximum );
93 double opacity()
const;
95 void setOpacity(
double opacity );
98 QDomElement writeXml( QDomDocument &doc )
const;
100 void readXml(
const QDomElement &elem );
104 double mClassificationMinimum = 0;
105 double mClassificationMaximum = 0;
143 double lineWidth()
const;
145 void setLineWidth(
double lineWidth );
148 QColor color()
const;
150 void setColor(
const QColor &color );
158 double filterMin()
const;
164 void setFilterMin(
double filterMin );
172 double filterMax()
const;
178 void setFilterMax(
double filterMax );
190 double minShaftLength()
const;
197 void setMinShaftLength(
double minShaftLength );
204 double maxShaftLength()
const;
211 void setMaxShaftLength(
double maxShaftLength );
218 double scaleFactor()
const;
225 void setScaleFactor(
double scaleFactor );
232 double fixedShaftLength()
const;
239 void setFixedShaftLength(
double fixedShaftLength );
242 double arrowHeadWidthRatio()
const;
244 void setArrowHeadWidthRatio(
double arrowHeadWidthRatio );
247 double arrowHeadLengthRatio()
const;
249 void setArrowHeadLengthRatio(
double arrowHeadLengthRatio );
252 bool isOnUserDefinedGrid()
const;
254 void setOnUserDefinedGrid(
bool enabled );
256 int userGridCellWidth()
const;
258 void setUserGridCellWidth(
int width );
260 int userGridCellHeight()
const;
262 void setUserGridCellHeight(
int height );
265 QDomElement writeXml( QDomDocument &doc )
const;
267 void readXml(
const QDomElement &elem );
271 QColor mColor = Qt::black;
272 double mFilterMin = -1;
273 double mFilterMax = -1;
275 double mMinShaftLength = 0.8;
276 double mMaxShaftLength = 10;
277 double mScaleFactor = 10;
278 double mFixedShaftLength = 20;
279 double mArrowHeadWidthRatio = 0.15;
280 double mArrowHeadLengthRatio = 0.40;
281 bool mOnUserDefinedGrid =
false;
282 int mUserGridCellWidth = 10;
283 int mUserGridCellHeight = 10;
331 QDomElement writeXml( QDomDocument &doc )
const;
333 void readXml(
const QDomElement &elem );
339 QHash<int, QgsMeshRendererScalarSettings> mRendererScalarSettings;
340 QHash<int, QgsMeshRendererVectorSettings> mRendererVectorSettings;
349 #endif //QGSMESHRENDERERSETTINGS_H QgsMeshRendererScalarSettings scalarSettings(int groupIndex) const
Returns renderer settings.
A ramp shader will color a raster pixel based on a list of values ranges in a ramp.
QgsMeshRendererMeshSettings triangularMeshSettings() const
Returns renderer settings.
Represents a mesh renderer settings for mesh object.
Represents a mesh renderer settings for scalar datasets.
void setVectorSettings(int groupIndex, const QgsMeshRendererVectorSettings &settings)
Sets new renderer settings.
void setScalarSettings(int groupIndex, const QgsMeshRendererScalarSettings &settings)
Sets new renderer settings.
Represents all mesh renderer settings.
Represents a mesh renderer settings for vector datasets.
void setTriangularMeshSettings(const QgsMeshRendererMeshSettings &settings)
Sets new renderer settings.
void setActiveVectorDataset(QgsMeshDatasetIndex index=QgsMeshDatasetIndex())
Sets active vector dataset for rendering.
Scale vector magnitude by factor scaleFactor()
void setNativeMeshSettings(const QgsMeshRendererMeshSettings &settings)
Sets new renderer settings, triggers repaint.
const double DEFAULT_LINE_WIDTH
void setActiveScalarDataset(QgsMeshDatasetIndex index=QgsMeshDatasetIndex())
Sets active scalar dataset for rendering.
QgsMeshDatasetIndex is index that identifies the dataset group (e.g.
QgsMeshDatasetIndex activeVectorDataset() const
Returns active vector dataset.
ArrowScalingMethod
Algorithm how to transform vector magnitude to length of arrow on the device in pixels.
QgsMeshDatasetIndex activeScalarDataset() const
Returns active scalar dataset.
QgsMeshRendererVectorSettings vectorSettings(int groupIndex) const
Returns renderer settings.
QgsMeshRendererMeshSettings nativeMeshSettings() const
Returns renderer settings.