QGIS API Documentation  3.2.0-Bonn (bc43194)
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 
21 {
22  return mEnabled;
23 }
24 
26 {
27  mEnabled = on;
28 }
29 
31 {
32  return mLineWidth;
33 }
34 
36 {
37  mLineWidth = lineWidth;
38 }
39 
41 {
42  return mColor;
43 }
44 
46 {
47  mColor = color;
48 }
49 
51 {
52  return mMaxColor;
53 }
54 
55 void QgsMeshRendererScalarSettings::setMaxColor( const QColor &maxColor )
56 {
57  mMaxColor = maxColor;
58 }
59 
61 {
62  return mMinColor;
63 }
64 
65 void QgsMeshRendererScalarSettings::setMinColor( const QColor &minColor )
66 {
67  mMinColor = minColor;
68 }
69 
71 {
72  return mMinValue;
73 }
74 
76 {
77  mMinValue = minValue;
78 }
79 
81 {
82  return mMaxValue;
83 }
84 
86 {
87  mMaxValue = maxValue;
88 }
89 
91 {
92  return mLineWidth;
93 }
94 
96 {
97  mLineWidth = lineWidth;
98 }
99 
101 {
102  return mColor;
103 }
104 
105 void QgsMeshRendererVectorSettings::setColor( const QColor &vectorColor )
106 {
107  mColor = vectorColor;
108 }
109 
111 {
112  return mFilterMin;
113 }
114 
115 void QgsMeshRendererVectorSettings::setFilterMin( double vectorFilterMin )
116 {
117  mFilterMin = vectorFilterMin;
118 }
119 
121 {
122  return mFilterMax;
123 }
124 
125 void QgsMeshRendererVectorSettings::setFilterMax( double vectorFilterMax )
126 {
127  mFilterMax = vectorFilterMax;
128 }
129 
131 {
132  return mShaftLengthMethod;
133 }
134 
136 {
137  mShaftLengthMethod = shaftLengthMethod;
138 }
139 
141 {
142  return mMinShaftLength;
143 }
144 
146 {
147  mMinShaftLength = minShaftLength;
148 }
149 
151 {
152  return mMaxShaftLength;
153 }
154 
156 {
157  mMaxShaftLength = maxShaftLength;
158 }
159 
161 {
162  return mScaleFactor;
163 }
164 
166 {
167  mScaleFactor = scaleFactor;
168 }
169 
171 {
172  return mFixedShaftLength;
173 }
174 
176 {
177  mFixedShaftLength = fixedShaftLength;
178 }
179 
181 {
182  return mArrowHeadWidthRatio;
183 }
184 
185 void QgsMeshRendererVectorSettings::setArrowHeadWidthRatio( double vectorHeadWidthRatio )
186 {
187  mArrowHeadWidthRatio = vectorHeadWidthRatio;
188 }
189 
191 {
192  return mArrowHeadLengthRatio;
193 }
194 
195 void QgsMeshRendererVectorSettings::setArrowHeadLengthRatio( double vectorHeadLengthRatio )
196 {
197  mArrowHeadLengthRatio = vectorHeadLengthRatio;
198 }
void setFilterMax(double filterMax)
Sets filter value for vector magnitudes.
void setLineWidth(double lineWidth)
Sets line width used for rendering (in millimeters)
void setMaxShaftLength(double maxShaftLength)
Sets maximum shaft length (in millimeters)
double minShaftLength() const
Returns mininimum shaft length (in millimeters)
double maxValue() const
Returns max scalar value that represents maxColor()
void setArrowHeadWidthRatio(double arrowHeadWidthRatio)
Sets ratio of the head width of the arrow (range 0-1)
double fixedShaftLength() const
Returns fixed arrow length (in millimeters)
QColor minColor() const
Returns color representing minimum scalar value in the dataset.
void setFilterMin(double filterMin)
Sets filter value for vector magnitudes.
bool isEnabled() const
Returns whether mesh structure rendering is enabled.
double arrowHeadLengthRatio() const
Returns ratio of the head length of the arrow (range 0-1)
QgsMeshRendererVectorSettings::ArrowScalingMethod shaftLengthMethod() const
Returns method used for drawing arrows.
void setMinShaftLength(double minShaftLength)
Sets mininimum shaft length (in millimeters)
double filterMin() const
Returns filter value for vector magnitudes.
double lineWidth() const
Returns line width used for rendering (in millimeters)
QColor maxColor() const
Returns color representing maximum scalar value in the dataset.
void setMinValue(double minValue)
Sets min scalar value that represents minColor()
void setColor(const QColor &color)
Sets color used for drawing arrows.
QColor color() const
Returns color used for drawing arrows.
double minValue() const
Returns min scalar value that represents minColor()
void setShaftLengthMethod(ArrowScalingMethod shaftLengthMethod)
Sets method used for drawing arrows.
void setMaxColor(const QColor &maxColor)
Sets color representing maximum scalar value in the dataset.
double filterMax() const
Returns filter value for vector magnitudes.
void setArrowHeadLengthRatio(double arrowHeadLengthRatio)
Sets ratio of the head length of the arrow (range 0-1)
double arrowHeadWidthRatio() const
Returns ratio of the head width of the arrow (range 0-1)
void setEnabled(bool enabled)
Sets whether mesh structure rendering is enabled.
void setLineWidth(double lineWidth)
Sets line width of the arrow in pixels (in millimeters)
double maxShaftLength() const
Returns maximum shaft length (in millimeters)
void setScaleFactor(double scaleFactor)
Sets scale factor.
void setFixedShaftLength(double fixedShaftLength)
Sets fixed length (in millimeters)
QColor color() const
Returns color used for rendering.
void setMinColor(const QColor &minColor)
Sets color representing maximum scalar value in the dataset.
double scaleFactor() const
Returns scale factor.
double lineWidth() const
Returns line width of the arrow (in millimeters)
ArrowScalingMethod
Algorithm how to transform vector magnitude to length of arrow on the device in pixels.
void setColor(const QColor &color)
Sets color used for rendering of the mesh.
void setMaxValue(double maxValue)
Sets min scalar value that represents minColor()