QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
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
33class CORE_EXPORT QgsProcessingModelOutput : public QgsProcessingModelComponent
34{
35 public:
36
40 QgsProcessingModelOutput( const QString &name = QString(), const QString &description = QString() );
41
42 QgsProcessingModelOutput *clone() const override SIP_FACTORY;
43
48 QString name() const { return mName; }
49
54 void setName( const QString &name ) { mName = name; }
55
61 QVariant defaultValue() const { return mDefaultValue; }
62
68 void setDefaultValue( const QVariant &value ) { mDefaultValue = value; }
69
77 bool isMandatory() const { return mMandatory; }
78
86 void setMandatory( bool mandatory ) { mMandatory = mandatory; }
87
92 QString childId() const { return mChildId; }
93
98 void setChildId( const QString &id ) { mChildId = id; }
99
104 QString childOutputName() const { return mOutputName; }
105
110 void setChildOutputName( const QString &name ) { mOutputName = name; }
111
116 QVariant toVariant() const;
117
122 bool loadVariant( const QVariantMap &map );
123
124 SIP_SKIP const QgsProcessingModelComment *comment() const override { return &mComment; }
125 QgsProcessingModelComment *comment() override { return &mComment; }
126 void setComment( const QgsProcessingModelComment &comment ) override { mComment = comment; }
127
128 private:
129
130 QString mName;
131 QVariant mDefaultValue;
132 QString mChildId;
133 QString mOutputName;
134 bool mMandatory = false;
135
136 QgsProcessingModelComment mComment;
137
138};
139
141
142#endif // QGSPROCESSINGMODELOUTPUT_H
#define SIP_SKIP
Definition qgis_sip.h:126
#define SIP_FACTORY
Definition qgis_sip.h:76