QGIS API Documentation 4.1.0-Master (0cdd3ae6384)
Loading...
Searching...
No Matches
qgsprocessingparameterheatmappixelsize.cpp
Go to the documentation of this file.
1/***************************************************************************
2 qgsprocessingparameterheatmappixelsize.cpp
3 ---------------------
4 Date : June 2026
5 Copyright : (C) 2026 by Nyall Dawson
6 Email : nyall dot dawson at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
17
19
20#include <QString>
21
22using namespace Qt::StringLiterals;
23
24
26 const QString &name, const QString &description, const QString &parentLayerParameter, const QString &radiusParameter, const QString &radiusFieldParameter, const QVariant &defaultValue
27)
28 : QgsProcessingParameterNumber( name, description, Qgis::ProcessingNumberParameterType::Double, defaultValue, false, 0 )
29 , mParentLayer( parentLayerParameter )
30 , mRadiusParam( radiusParameter )
31 , mRadiusFieldParam( radiusFieldParameter )
32{}
33
38
40{
41 return typeName();
42}
43
45{
46 switch ( outputType )
47 {
49 {
50 QString code
51 = u"QgsProcessingParameterHeatmapPixelSize('%1', %2, %3, %4, %5"_s
54 code += u", defaultValue=%1)"_s.arg( valueAsPythonString( mDefault, c ) );
55 return code;
56 }
57 }
58 return QString();
59}
Provides global constants and enumerations for use throughout the application.
Definition qgis.h:62
Contains information about the context in which a processing algorithm is executed.
QVariant defaultValue() const
Returns the default value for the parameter.
QString description() const
Returns the description for the parameter.
QString name() const
Returns the name of the parameter.
QVariant mDefault
Default value for parameter.
QgsProcessingParameterHeatmapPixelSize(const QString &name, const QString &description=QString(), const QString &parentLayerParameter=QString(), const QString &radiusParameter=QString(), const QString &radiusFieldParameter=QString(), const QVariant &defaultValue=QVariant())
Constructor for QgsProcessingParameterHeatmapPixelSize.
QString radiusFieldParameter() const
Returns the radius field parameter name.
QString parentLayerParameter() const
Returns the linked parent layer parameter name.
static QString typeName()
Returns the type name for the parameter class.
QString asPythonString(QgsProcessing::PythonOutputType outputType=QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass) const override
Returns the parameter definition as a Python command which can be used within a Python Processing scr...
QString type() const override
Unique parameter type name.
QString radiusParameter() const
Returns the linked radius parameter name.
QgsProcessingParameterHeatmapPixelSize * clone() const override
Creates a clone of the parameter definition.
QString valueAsPythonString(const QVariant &value, QgsProcessingContext &context) const override
Returns a string version of the parameter input value, which is suitable for use as an input paramete...
QgsProcessingParameterNumber(const QString &name, const QString &description=QString(), Qgis::ProcessingNumberParameterType type=Qgis::ProcessingNumberParameterType::Integer, const QVariant &defaultValue=QVariant(), bool optional=false, double minValue=std::numeric_limits< double >::lowest()+1, double maxValue=std::numeric_limits< double >::max())
Constructor for QgsProcessingParameterNumber.
static QString stringToPythonLiteral(const QString &string)
Converts a string to a Python string literal.
PythonOutputType
Available Python output types.
@ PythonQgsProcessingAlgorithmSubclass
Full Python QgsProcessingAlgorithm subclass.
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