QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
Loading...
Searching...
No Matches
qgsprocessingparametertype.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsprocessingparametertype.h
3 ------------------------
4 begin : March 2018
5 copyright : (C) 2018 by Matthias Kuhn
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18
19#ifndef QGSPROCESSINGPARAMETERTYPE_H
20#define QGSPROCESSINGPARAMETERTYPE_H
21
23#include "qgis.h"
24#include "qgis_sip.h"
25#include <QObject>
26
34{
35 public:
36
40 virtual QgsProcessingParameterDefinition *create( const QString &name ) const = 0 SIP_FACTORY;
41
42 virtual ~QgsProcessingParameterType() = default;
43
49 virtual QString description() const = 0;
50
55 virtual QString name() const = 0;
56
57 // TODO QGIS 4.0 -- make pure virtual
58
66 virtual QString pythonImportString() const { return QString(); }
67
68 // TODO QGIS 4.0 -- make pure virtual
69
76 virtual QString className() const
77 {
78 return name(); // this is wrong, but it's better than nothing for subclasses which don't implement this method
79 }
80
84 virtual QString id() const = 0;
85
90 virtual Qgis::ProcessingParameterTypeFlags flags() const;
91
96 virtual QVariantMap metadata() const;
97
108 virtual QStringList acceptedPythonTypes() const;
109
121 virtual QStringList acceptedStringValues() const;
122};
123
124#endif // QGSPROCESSINGPARAMETERTYPE_H
QFlags< ProcessingParameterTypeFlag > ProcessingParameterTypeFlags
Flags which dictate the behavior of Processing parameter types.
Definition qgis.h:3465
Base class for the definition of processing parameters.
Makes metadata of processing parameters available.
virtual QString name() const =0
A human readable and translatable short name for this parameter type.
virtual QgsProcessingParameterDefinition * create(const QString &name) const =0
Creates a new parameter of this type.
virtual QString description() const =0
A human readable and translatable description for this parameter type.
virtual QString id() const =0
A static id for this type which will be used for storing this parameter type.
virtual QString className() const
Returns the corresponding class name for the parameter type.
virtual ~QgsProcessingParameterType()=default
virtual QString pythonImportString() const
Returns a valid Python import string for importing the corresponding parameter type,...
#define SIP_FACTORY
Definition qgis_sip.h:76