QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
processing
models
qgsprocessingmodelgroupbox.cpp
Go to the documentation of this file.
1
/***************************************************************************
2
qgsprocessingmodelgroupbox.cpp
3
--------------------------
4
begin : March 2020
5
copyright : (C) 2020 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 "
qgsprocessingmodelgroupbox.h
"
19
20
#include <QString>
21
#include <QUuid>
22
23
using namespace
Qt::StringLiterals;
24
26
27
QgsProcessingModelGroupBox::QgsProcessingModelGroupBox(
const
QString &description )
28
: QgsProcessingModelComponent( description )
29
, mUuid( QUuid::createUuid().toString() )
30
{
31
setSize( QSizeF( 400, 360 ) );
32
}
33
34
QgsProcessingModelGroupBox *QgsProcessingModelGroupBox::clone()
const
35
{
36
return
new
QgsProcessingModelGroupBox( *
this
);
37
}
38
39
QVariant QgsProcessingModelGroupBox::toVariant()
const
40
{
41
QVariantMap map;
42
map.insert( u
"uuid"
_s, mUuid );
43
saveCommonProperties( map );
44
return
map;
45
}
46
47
bool
QgsProcessingModelGroupBox::loadVariant(
const
QVariantMap &map,
bool
ignoreUuid )
48
{
49
restoreCommonProperties( map );
50
if
( !ignoreUuid )
51
mUuid = map.value( u
"uuid"
_s ).toString();
52
return
true
;
53
}
54
55
QString QgsProcessingModelGroupBox::uuid()
const
56
{
57
return
mUuid;
58
}
59
60
qgsprocessingmodelgroupbox.h
Generated on
for QGIS API Documentation by
1.17.0