QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
qgsprocessingmodelparameter.cpp
Go to the documentation of this file.
1/***************************************************************************
2 qgsprocessingmodelparameter.cpp
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
19
21
22QgsProcessingModelParameter::QgsProcessingModelParameter( const QString &parameterName )
23 : mParameterName( parameterName )
24{
25
26}
27
28QgsProcessingModelParameter *QgsProcessingModelParameter::clone() const
29{
30 return new QgsProcessingModelParameter( *this );
31}
32
33QVariant QgsProcessingModelParameter::toVariant() const
34{
35 QVariantMap map;
36 map.insert( QStringLiteral( "name" ), mParameterName );
37 saveCommonProperties( map );
38 return map;
39}
40
41bool QgsProcessingModelParameter::loadVariant( const QVariantMap &map )
42{
43 mParameterName = map.value( QStringLiteral( "name" ) ).toString();
44 restoreCommonProperties( map );
45 return true;
46}
47