QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
qgsprocessingmodeloutput.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsprocessingmodeloutput.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 QGSPROCESSINGMODELOUTPUT_H
19#define QGSPROCESSINGMODELOUTPUT_H
20
21#include "qgis_core.h"
22#include "qgis.h"
26
28
34class CORE_EXPORT QgsProcessingModelOutput : public QgsProcessingModelComponent
35{
36 public:
37
41 QgsProcessingModelOutput( const QString &name = QString(), const QString &description = QString() );
42
43 QgsProcessingModelOutput *clone() const override SIP_FACTORY;
44
49 QString name() const { return mName; }
50
55 void setName( const QString &name ) { mName = name; }
56
62 QVariant defaultValue() const { return mDefaultValue; }
63
69 void setDefaultValue( const QVariant &value ) { mDefaultValue = value; }
70
78 bool isMandatory() const { return mMandatory; }
79
87 void setMandatory( bool mandatory ) { mMandatory = mandatory; }
88
93 QString childId() const { return mChildId; }
94
99 void setChildId( const QString &id ) { mChildId = id; }
100
105 QString childOutputName() const { return mOutputName; }
106
111 void setChildOutputName( const QString &name ) { mOutputName = name; }
112
117 QVariant toVariant() const;
118
123 bool loadVariant( const QVariantMap &map );
124
125 SIP_SKIP const QgsProcessingModelComment *comment() const override { return &mComment; }
126 QgsProcessingModelComment *comment() override { return &mComment; }
127 void setComment( const QgsProcessingModelComment &comment ) override { mComment = comment; }
128
129 private:
130
131 QString mName;
132 QVariant mDefaultValue;
133 QString mChildId;
134 QString mOutputName;
135 bool mMandatory = false;
136
137 QgsProcessingModelComment mComment;
138
139};
140
142
143#endif // QGSPROCESSINGMODELOUTPUT_H
#define SIP_SKIP
Definition: qgis_sip.h:126
#define SIP_FACTORY
Definition: qgis_sip.h:76