QGIS API Documentation 4.1.0-Master (0cdd3ae6384)
Loading...
Searching...
No Matches
qgsprocessingparameterheatmappixelsize.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsprocessingparameterheatmappixelsize.h
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
16#ifndef QGSPROCESSINGPARAMETERHEATMAPPIXELSIZE_H
17#define QGSPROCESSINGPARAMETERHEATMAPPIXELSIZE_H
18
22
23#include <QString>
24
25using namespace Qt::StringLiterals;
26
27
35{
36 public:
39 const QString &name,
40 const QString &description = QString(),
41 const QString &parentLayerParameter = QString(),
42 const QString &radiusParameter = QString(),
43 const QString &radiusFieldParameter = QString(),
44 const QVariant &defaultValue = QVariant()
45 );
46
48 QString type() const override;
50 static QString typeName() { return u"heatmappixelsize"_s; } // cppcheck-suppress duplInheritedMember
52
56 QString parentLayerParameter() const { return mParentLayer; }
57
61 QString radiusParameter() const { return mRadiusParam; }
62
66 QString radiusFieldParameter() const { return mRadiusFieldParam; }
67
68 private:
69 QString mParentLayer;
70 QString mRadiusParam;
71 QString mRadiusFieldParam;
72};
73
74#ifndef SIP_RUN
76
84class CORE_EXPORT QgsProcessingParameterTypeHeatmapPixelSize : public QgsProcessingParameterType
85{
86 public:
87 QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY { return new QgsProcessingParameterHeatmapPixelSize( name ); }
88
89 QString description() const override { return QCoreApplication::translate( "Processing", "An input allowing setting the pixel size for heatmap algorithms." ); }
90
91 QString name() const override { return QCoreApplication::translate( "Processing", "Heatmap Pixel Size" ); }
92
93 QString id() const override { return QgsProcessingParameterHeatmapPixelSize::typeName(); }
94
95 QString pythonImportString() const override { return u"from qgis.core import QgsProcessingParameterHeatmapPixelSize"_s; }
96
97 QString className() const override { return u"QgsProcessingParameterHeatmapPixelSize"_s; }
98
99 QStringList acceptedPythonTypes() const override { return QStringList() << u"int"_s << u"float"_s; }
100
101 QStringList acceptedStringValues() const override { return QStringList() << QObject::tr( "A numeric value" ); }
102
103 QStringList acceptedParameterTypes() const override
104 {
105 return QStringList()
113 }
114
115 QStringList acceptedOutputTypes() const override
116 {
118 }
119
120 QColor modelColor() const override { return QColor( 34, 157, 214 ); /* blue */ };
121};
122
124#endif
125
126#endif // QGSPROCESSINGPARAMETERHEATMAPPIXELSIZE_H
static QString typeName()
Returns the type name for the output class.
static QString typeName()
Returns the type name for the output class.
static QString typeName()
Returns the type name for the output class.
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.
virtual QColor modelColor() const
Returns the color to use for the parameter in model designer windows.
static QString typeName()
Returns the type name for the parameter class.
static QString typeName()
Returns the type name for the parameter class.
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 radiusParameter() const
Returns the linked radius parameter name.
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.
QgsProcessingParameterDefinition * clone() const override
Creates a clone of the parameter definition.
static QString typeName()
Returns the type name for the parameter class.
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 typeName()
Returns the type name for the parameter class.
static QString typeName()
Returns the type name for the parameter class.
Makes metadata of processing parameters available.
static QString typeName()
Returns the type name for the parameter class.
PythonOutputType
Available Python output types.
@ PythonQgsProcessingAlgorithmSubclass
Full Python QgsProcessingAlgorithm subclass.
#define SIP_FACTORY
Definition qgis_sip.h:83