QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
27 std::unique_ptr< QgsProcessingParameterNumber > param = std::make_unique< QgsProcessingParameterNumber >( QStringLiteral(
"INTERVAL" ), QObject::tr(
"Interval size" ),
QgsProcessingParameterNumber::Double, 1,
false, 0.000000000001 );
40 return QObject::tr(
"Fixed Interval" );
45 return QStringLiteral(
"Fixed" );
53 QList<double> QgsClassificationFixedInterval::calculateBreaks(
double &minimum,
double &maximum,
const QList<double> &,
int )
66 double value = minimum;
67 while ( value < maximum )
bool valuesRequired() const override
Returns if the method requires values to calculate the classes If not, bounds are sufficient.
QgsClassificationMethod * clone() const override
Returns a clone of the method.
@ Double
Double/float values.
QgsClassificationMethod is an abstract class for implementations of classification methods.
QString name() const override
The readable and translate name of the method.
void addParameter(QgsProcessingParameterDefinition *definition)
Add a parameter to the method.
Base class for the definition of processing parameters.
const QgsProcessingParameterDefinition * parameterDefinition(const QString ¶meterName) const
Returns the parameter from its name.
Contains information about the context in which a processing algorithm is executed.
bool qgsDoubleNear(double a, double b, double epsilon=4 *std::numeric_limits< double >::epsilon())
Compare two doubles (but allow some difference)
void copyBase(QgsClassificationMethod *c) const
Copy the parameters (shall be used in clone implementation)
Implementation of a fixed interval classification.
QIcon icon() const override
The icon of the method.
As part of the API refactoring and improvements which landed in the Processing API was substantially reworked from the x version This was done in order to allow much of the underlying Processing framework to be ported into c
QString id() const override
The id of the method as saved in the project, must be unique in registry.
QgsClassificationFixedInterval()
static QIcon getThemeIcon(const QString &name, const QColor &fillColor=QColor(), const QColor &strokeColor=QColor())
Helper to get a theme icon.
QVariantMap parameterValues() const
Returns the values of the processing parameters.
static double parameterAsDouble(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to a static double value.