QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
qgsprocessingmodelparameter.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsprocessingmodelparameter.h
3 -----------------------------
4 begin : June 2017
5 copyright : (C) 2017 by Nyall Dawson
6 email : nyall dot dawson at gmail dot com
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#ifndef QGSPROCESSINGMODELPARAMETER_H
19#define QGSPROCESSINGMODELPARAMETER_H
20
21#include "qgis_core.h"
22#include "qgis.h"
25
27
28
34class CORE_EXPORT QgsProcessingModelParameter : public QgsProcessingModelComponent
35{
36 public:
37
42 QgsProcessingModelParameter( const QString &parameterName = QString() );
43
44 QgsProcessingModelParameter *clone() const override SIP_FACTORY;
45
51 QString parameterName() const { return mParameterName; }
52
58 void setParameterName( const QString &name ) { mParameterName = name; }
59
64 QVariant toVariant() const;
65
70 bool loadVariant( const QVariantMap &map );
71
72 SIP_SKIP const QgsProcessingModelComment *comment() const override { return &mComment; }
73 QgsProcessingModelComment *comment() override { return &mComment; }
74 void setComment( const QgsProcessingModelComment &comment ) override { mComment = comment; }
75
76 private:
77
78 QString mParameterName;
79
80 QgsProcessingModelComment mComment;
81
82};
83
85
86#endif // QGSPROCESSINGMODELPARAMETER_H
#define SIP_SKIP
Definition: qgis_sip.h:126
#define SIP_FACTORY
Definition: qgis_sip.h:76