16#ifndef QGSRENDERERRANGE_H
17#define QGSRENDERERRANGE_H
23#include <QRegularExpression>
104 QString
label()
const;
155 QString
dump()
const;
166 Q_DECL_DEPRECATED
void toSld( QDomDocument &doc, QDomElement &element, QVariantMap props,
bool firstRange =
false ) const
SIP_DEPRECATED;
178 bool toSld( QDomDocument &doc, QDomElement &element, const QString &classAttribute,
QgsSldExportContext &context,
bool firstRange = false ) const;
181 SIP_PYOBJECT __repr__();
183 const QString str = sipCpp->label().isEmpty()
184 ? QStringLiteral(
"<QgsRendererRange: %1 - %2>" ).arg( sipCpp->lowerValue() ).arg( sipCpp->upperValue() )
185 : QStringLiteral(
"<QgsRendererRange: %1 - %2 (%3)>" ).arg( sipCpp->lowerValue() ).arg( sipCpp->upperValue() ).arg( sipCpp->label() );
186 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
189 SIP_PYOBJECT __getitem__(
int );
193 sipRes = Py_BuildValue(
"d", sipCpp->lowerValue() );
197 sipRes = Py_BuildValue(
"d", sipCpp->upperValue() );
201 QString msg = QString(
"Bad index: %1" ).arg( a0 );
202 PyErr_SetString( PyExc_IndexError, msg.toLatin1().constData() );
240 void setPrecision(
int precision );
248 QString labelForRange(
double lower,
double upper )
const SIP_PYNAME( labelForLowerUpper );
250 QString formatNumber(
double value )
const;
252 void setFromDomElement( QDomElement &element );
253 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