16#ifndef QGSRENDERERRANGE_H
17#define QGSRENDERERRANGE_H
23#include <QRegularExpression>
26using namespace Qt::StringLiterals;
107 QString
label()
const;
158 QString
dump()
const;
169 Q_DECL_DEPRECATED
void toSld( QDomDocument &doc, QDomElement &element, QVariantMap props,
bool firstRange =
false ) const
SIP_DEPRECATED;
181 bool toSld( QDomDocument &doc, QDomElement &element, const QString &classAttribute,
QgsSldExportContext &context,
bool firstRange = false ) const;
184 SIP_PYOBJECT __repr__();
186 const QString str = sipCpp->label().isEmpty()
187 ? u
"<QgsRendererRange: %1 - %2>"_s.arg( sipCpp->lowerValue() ).arg( sipCpp->upperValue() )
188 : u
"<QgsRendererRange: %1 - %2 (%3)>"_s.arg( sipCpp->lowerValue() ).arg( sipCpp->upperValue() ).arg( sipCpp->label() );
189 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
192 SIP_PYOBJECT __getitem__(
int );
196 sipRes = Py_BuildValue(
"d", sipCpp->lowerValue() );
200 sipRes = Py_BuildValue(
"d", sipCpp->upperValue() );
204 QString msg = QString(
"Bad index: %1" ).arg( a0 );
205 PyErr_SetString( PyExc_IndexError, msg.toLatin1().constData() );
243 void setPrecision(
int precision );
251 QString labelForRange(
double lower,
double upper )
const SIP_PYNAME( labelForLowerUpper );
253 QString formatNumber(
double value )
const;
255 void setFromDomElement( QDomElement &element );
256 void saveToDomElement( QDomElement &element );
Contains the information about a classification range.
Represents a value range for a QgsGraduatedSymbolRenderer.
void setUpperValue(double upperValue)
Sets the upper bound of the range.
QgsRendererRange()=default
QString label() const
Returns the label used for the range.
void setSymbol(QgsSymbol *s)
Sets the symbol used for the range.
std::unique_ptr< QgsSymbol > mSymbol
Q_DECL_DEPRECATED void toSld(QDomDocument &doc, QDomElement &element, QVariantMap props, bool firstRange=false) const
Creates a DOM element representing the range in SLD format.
QgsRendererRange & operator=(QgsRendererRange range)
QgsSymbol * symbol() const
Returns the symbol used for the range.
void setLabel(const QString &label)
Sets the label used for the range.
bool renderState() const
Returns true if the range should be rendered.
friend class QgsGraduatedSymbolRendererWidget
void setRenderState(bool render)
Sets whether the range should be rendered.
QString dump() const
Dumps a string representation of the range.
double upperValue() const
Returns the upper bound of the range.
void setLowerValue(double lowerValue)
Sets the lower bound of the range.
QString uuid() const
Returns the unique identifier for this range.
double lowerValue() const
Returns the lower bound of the range.
Holds SLD export options and other information related to SLD export of a QGIS layer style.
Abstract base class for all rendered symbols.
bool operator<(const QVariant &v1, const QVariant &v2)
Compares two QVariant values and returns whether the first is less than the second.
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
QList< QgsRendererRange > QgsRangeList