Class: QgsRendererRange¶
- class qgis.core.QgsRendererRange¶
Bases:
sip.wrapper
Constructor for QgsRendererRange.
QgsRendererRange(range:
QgsClassificationRange
, symbol:QgsSymbol
, render: bool = True) Creates a renderer symbol range- Parameters:
range – The classification range
symbol – The symbol for this renderer range
render – If
True
, it will be renderered
QgsRendererRange(lowerValue: float, upperValue: float, symbol:
QgsSymbol
, label: str, render: bool = True)QgsRendererRange(range:
QgsRendererRange
)Methods
Dumps a string representation of the range.
Returns the label used for the range.
Returns the lower bound of the range.
Returns
True
if the range should be rendered.Sets the label used for the range.
Sets the lower bound of the range.
Sets whether the range should be rendered.
Sets the symbol used for the range.
Sets the upper bound of the range.
- param other:
Returns the symbol used for the range.
Creates a DOM element representing the range in SLD format.
Returns the upper bound of the range.
- dump(self) str ¶
Dumps a string representation of the range.
- Return type:
str
- label(self) str ¶
Returns the label used for the range.
See also
- Return type:
str
- lowerValue(self) float ¶
Returns the lower bound of the range.
See also
See also
- Return type:
float
- renderState(self) bool ¶
Returns
True
if the range should be rendered.See also
New in version 2.6.
- Return type:
bool
- setLabel(self, label: str)¶
Sets the label used for the range.
See also
- Parameters:
label (str) –
- setLowerValue(self, lowerValue: float)¶
Sets the lower bound of the range.
See also
See also
- Parameters:
lowerValue (float) –
- setRenderState(self, render: bool)¶
Sets whether the range should be rendered.
See also
New in version 2.6.
- Parameters:
render (bool) –
- setSymbol(self, s: QgsSymbol)¶
Sets the symbol used for the range.
Ownership of the symbol is transferred.
See also
- Parameters:
s (QgsSymbol) –
- setUpperValue(self, upperValue: float)¶
Sets the upper bound of the range.
See also
See also
- Parameters:
upperValue (float) –
- swap(self, other: QgsRendererRange)¶
- Parameters:
other (QgsRendererRange) –
- toSld(self, doc: QDomDocument, element: QDomElement, props: Dict[str, Any], firstRange: bool = False)¶
Creates a DOM element representing the range in SLD format.
- Parameters:
doc (QDomDocument) – DOM document
element (QDomElement) – destination DOM element
props (Dict[str) – graduated renderer properties
firstRange (bool = False) – set to
True
if the range is the first range, where the lower value uses a <= test rather than a < test.
- upperValue(self) float ¶
Returns the upper bound of the range.
See also
See also
- Return type:
float