QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
processing
models
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
18
#include "
qgsprocessingmodelparameter.h
"
19
20
#include <QString>
21
22
using namespace
Qt::StringLiterals;
23
25
26
QgsProcessingModelParameter::QgsProcessingModelParameter(
const
QString ¶meterName )
27
: mParameterName( parameterName )
28
{}
29
30
QgsProcessingModelParameter *QgsProcessingModelParameter::clone()
const
31
{
32
return
new
QgsProcessingModelParameter( *
this
);
33
}
34
35
QVariant QgsProcessingModelParameter::toVariant()
const
36
{
37
QVariantMap map;
38
map.insert( u
"name"
_s, mParameterName );
39
saveCommonProperties( map );
40
return
map;
41
}
42
43
bool
QgsProcessingModelParameter::loadVariant(
const
QVariantMap &map )
44
{
45
mParameterName = map.value( u
"name"
_s ).toString();
46
restoreCommonProperties( map );
47
return
true
;
48
}
49
qgsprocessingmodelparameter.h
Generated on
for QGIS API Documentation by
1.17.0