16#ifndef QGSRENDERERRANGE_H
17#define QGSRENDERERRANGE_H
23#include <QRegularExpression>
67 double lowerValue()
const;
75 double upperValue()
const;
89 QString label()
const;
105 void setLabel(
const QString &label );
113 void setLowerValue(
double lowerValue );
121 void setUpperValue(
double upperValue );
129 bool renderState()
const;
137 void setRenderState(
bool render );
142 QString dump()
const;
152 void toSld( QDomDocument &doc, QDomElement &element, QVariantMap props,
bool firstRange =
false )
const;
155 SIP_PYOBJECT __repr__();
157 const QString
str = sipCpp->label().isEmpty()
158 ? QStringLiteral(
"<QgsRendererRange: %1 - %2>" ).arg( sipCpp->lowerValue() ).arg( sipCpp->upperValue() )
159 : QStringLiteral(
"<QgsRendererRange: %1 - %2 (%3)>" ).arg( sipCpp->lowerValue() ).arg( sipCpp->upperValue() ).arg( sipCpp->label() );
160 sipRes = PyUnicode_FromString(
str.toUtf8().constData() );
163 SIP_PYOBJECT __getitem__(
int );
167 sipRes = Py_BuildValue(
"d", sipCpp->lowerValue() );
171 sipRes = Py_BuildValue(
"d", sipCpp->upperValue() );
175 QString msg = QString(
"Bad index: %1" ).arg( a0 );
176 PyErr_SetString( PyExc_IndexError, msg.toLatin1().constData() );
182 double mLowerValue = 0, mUpperValue = 0;
209 QString
format()
const {
return mFormat; }
210 void setFormat(
const QString &format ) { mFormat = format; }
219 QString labelForRange(
double lower,
double upper )
const SIP_PYNAME( labelForLowerUpper );
221 QString formatNumber(
double value )
const;
223 void setFromDomElement( QDomElement &element );
224 void saveToDomElement( QDomElement &element );
232 bool mTrimTrailingZeroes =
false;
234 double mNumberScale = 1.0;
QgsClassificationRange contains the information about a classification range.
QgsRendererRange()=default
Constructor for QgsRendererRange.
std::unique_ptr< QgsSymbol > mSymbol
Abstract base class for all rendered symbols.
int ANALYSIS_EXPORT lower(int n, int i)
Lower function.
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