49 QgsRenderedLayerStatistics(
const QString &layerId,
double minimum = std::numeric_limits<double>::quiet_NaN(),
double maximum = std::numeric_limits<double>::quiet_NaN() );
53 double minP = a1 == Py_None ? std::numeric_limits<double>::quiet_NaN() : PyFloat_AsDouble( a1 );
54 double maxP = a2 == Py_None ? std::numeric_limits<double>::quiet_NaN() : PyFloat_AsDouble( a2 );
55 QList<double> minL = {minP};
56 QList<double> maxL = {maxP};
57 sipCpp =
new sipQgsRenderedLayerStatistics( *a0, minL, maxL );
62 SIP_PYOBJECT __repr__();
65 minimums.reserve( sipCpp->minimum().size() );
66 for (
double min : sipCpp->minimum() )
68 minimums.append( QString::number( min ) );
71 maximums.reserve( sipCpp->maximum().size() );
72 for (
double max : sipCpp->maximum() )
74 maximums.append( QString::number( max ) );
76 QString str = QStringLiteral(
"<QgsRenderedLayerStatistics: %1 (min: %2 - max: %3)>" ).arg( sipCpp->layerId(), minimums.join(
',' ), maximums.join(
',' ) );
77 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
85 QList<double> minimum()
const;
91 double minimum(
int index )
const;
97 QList<double> maximum()
const;
103 double maximum(
int index )
const;
109 void setMinimum( QList<double> &minimum );
116 bool setMinimum(
int index,
double minimum );
122 void setMaximum( QList<double> &maximum );
129 bool setMaximum(
int index,
double maximum );