1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/processing/models/qgsprocessingmodelchildalgorithm.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsProcessingModelChildAlgorithm : QgsProcessingModelComponent
{
%Docstring(signature="appended")
Child algorithm representing a single component of a
:py:class:`QgsProcessingModelAlgorithm`.
%End
%TypeHeaderCode
#include "qgsprocessingmodelchildalgorithm.h"
%End
public:
QgsProcessingModelChildAlgorithm( const QString &algorithmId = QString() );
%Docstring
Constructor for QgsProcessingModelChildAlgorithm. The ``algorithmId``
parameter should be set to a :py:class:`QgsProcessingAlgorithm`
algorithm ID.
%End
QgsProcessingModelChildAlgorithm( const QgsProcessingModelChildAlgorithm &other );
virtual QgsProcessingModelChildAlgorithm *clone() const /Factory/;
void copyNonDefinitionPropertiesFromModel( QgsProcessingModelAlgorithm *model );
%Docstring
Copies all non-specific definition properties from the the matching
component from a ``model``.
This includes properties like the size and position of the component,
but not properties like the specific algorithm or input details.
.. versionadded:: 3.14
%End
QString childId() const;
%Docstring
Returns the child algorithm's unique ID string, used the identify this
child algorithm within its parent model.
.. seealso:: :py:func:`setChildId`
.. seealso:: :py:func:`generateChildId`
%End
void setChildId( const QString &id );
%Docstring
Sets the child algorithm's unique ``id`` string, used the identify this
child algorithm within its parent model.
.. seealso:: :py:func:`childId`
.. seealso:: :py:func:`generateChildId`
%End
void generateChildId( const QgsProcessingModelAlgorithm &model );
%Docstring
Automatically generates a unique
:py:func:`~QgsProcessingModelChildAlgorithm.childId` for the algorithm,
avoiding child IDs which are already present in ``model``.
.. seealso:: :py:func:`childId`
.. seealso:: :py:func:`setChildId`
%End
QString algorithmId() const;
%Docstring
Returns the underlying child algorithm's ID.
.. seealso:: :py:func:`algorithm`
.. seealso:: :py:func:`setAlgorithmId`
%End
bool setAlgorithmId( const QString &algorithmId );
%Docstring
Sets the underlying child algorithm's ID. This should be set to an
existing :py:class:`QgsProcessingAlgorithm` algorithm ID.
Returns ``True`` if the algorithm was successfully set.
.. seealso:: :py:func:`reattach`
.. seealso:: :py:func:`algorithm`
.. seealso:: :py:func:`algorithmId`
%End
bool reattach() const;
%Docstring
Attempts to re-attach the child to the algorithm specified by
:py:func:`~QgsProcessingModelChildAlgorithm.algorithmId`.
This can be run to relink the child to algorithms from providers which
were not originally available for the model to link to.
Returns ``True`` if the algorithm was successfully reattached.
.. seealso:: :py:func:`algorithm`
.. seealso:: :py:func:`setAlgorithmId`
%End
QVariantMap configuration() const;
%Docstring
Returns the child algorithm's configuration map.
This map specifies configuration settings which are passed to the
algorithm, allowing it to dynamically adjust its initialized parameters
and outputs according to this configuration. This allows child
algorithms in the model to adjust their behavior at run time according
to some user configuration.
.. seealso:: :py:func:`setConfiguration`
%End
void setConfiguration( const QVariantMap &configuration );
%Docstring
Sets the child algorithm's ``configuration`` map.
This map specifies configuration settings which are passed to the
algorithm, allowing it to dynamically adjust its initialized parameters
and outputs according to this configuration. This allows child
algorithms in the model to adjust their behavior at run time according
to some user configuration.
.. seealso:: :py:func:`configuration`
%End
const QgsProcessingAlgorithm *algorithm() const;
%Docstring
Returns the underlying child algorithm, or ``None`` if a matching
algorithm is not available.
.. seealso:: :py:func:`reattach`
.. seealso:: :py:func:`algorithmId`
%End
QMap< QString, QList< QgsProcessingModelChildParameterSource > > parameterSources() const;
%Docstring
Returns a map of parameter sources. The keys are the child algorithm
parameter names, the values are the sources for that parameter.
.. seealso:: :py:func:`setParameterSources`
.. seealso:: :py:func:`addParameterSources`
%End
void setParameterSources( const QMap< QString, QList< QgsProcessingModelChildParameterSource > > &sources );
%Docstring
Sets the map of parameter ``sources``. The keys are the child algorithm
parameter names, the values are the sources for that parameter.
.. seealso:: :py:func:`parameterSources`
.. seealso:: :py:func:`addParameterSources`
%End
void addParameterSources( const QString &name, const QList< QgsProcessingModelChildParameterSource > &source );
%Docstring
Adds a parameter source. The ``name`` argument should match one of the
child algorithm's parameter names, and the ``sources`` argument is used
to set the sources for that parameter.
Any existing parameter sources with matching name will be replaced.
.. seealso:: :py:func:`parameterSources`
.. seealso:: :py:func:`setParameterSources`
%End
bool isActive() const;
%Docstring
Returns ``True`` if the child algorithm is active.
.. seealso:: :py:func:`setActive`
%End
void setActive( bool active );
%Docstring
Sets whether the child algorithm is active.
.. seealso:: :py:func:`isActive`
%End
QList< QgsProcessingModelChildDependency > dependencies() const;
%Docstring
Returns the list of child algorithms from the parent model on which this
algorithm is dependent.
.. seealso:: :py:func:`setDependencies`
%End
void setDependencies( const QList< QgsProcessingModelChildDependency > &dependencies );
%Docstring
Sets the list of child algorithms from the parent model on which this
algorithm is dependent.
.. seealso:: :py:func:`dependencies`
%End
QMap<QString, QgsProcessingModelOutput> modelOutputs() const;
%Docstring
Returns the map of final model outputs which are generated by this child
algorithm. The keys are the output names from this child algorithm. Only
outputs which are part of the final outputs from the model are included
in this map.
.. seealso:: :py:func:`setModelOutputs`
.. seealso:: :py:func:`modelOutput`
%End
QgsProcessingModelOutput &modelOutput( const QString &name );
%Docstring
Returns the final model output with matching ``name``. If no output
exists with the name, a new one will be created and returned.
If child model outputs are altered by this method,
:py:func:`QgsProcessingModelAlgorithm.updateDestinationParameters()`
must be called on the parent model.
.. seealso:: :py:func:`modelOutputs`
.. seealso:: :py:func:`setModelOutputs`
%End
void setModelOutputs( const QMap<QString, QgsProcessingModelOutput> &outputs );
%Docstring
Sets the map of final model ``outputs`` which are generated by this
child algorithm. Only outputs which are part of the final outputs from
the model should be included in this map.
If child model outputs are altered by this method,
:py:func:`QgsProcessingModelAlgorithm.updateDestinationParameters()`
must be called on the parent model.
.. seealso:: :py:func:`modelOutputs`
%End
bool removeModelOutput( const QString &name );
%Docstring
Removes an existing output from the final model outputs.
:py:func:`QgsProcessingModelAlgorithm.updateDestinationParameters()`
must be called on the parent model.
.. seealso:: :py:func:`modelOutputs`
.. versionadded:: 3.2
%End
QVariant toVariant() const;
%Docstring
Saves this child to a QVariant.
.. seealso:: :py:func:`loadVariant`
%End
bool loadVariant( const QVariant &child );
%Docstring
Loads this child from a QVariant.
.. seealso:: :py:func:`toVariant`
%End
QStringList asPythonCode( QgsProcessing::PythonOutputType outputType, const QgsStringMap &extraParameters, int currentIndent, int indentSize,
const QMap<QString, QString> &friendlyChildNames, const QMap<QString, QString> &friendlyOutputNames ) const;
%Docstring
Attempts to convert the child to executable Python code, and returns a
list of the generated lines of code.
The ``outputType`` argument specifies the type of script to generate.
Additional parameters to be passed to the child algorithm are specified
in the ``extraParameters`` argument.
The ``currentIndent`` and ``indentSize`` are used to set the base line
indent and size of further indented lines respectively.
The ``friendlyChildNames`` argument gives a map of child id to a
friendly algorithm name, to be used in the code to identify that
algorithm instead of the raw child id.
%End
virtual QgsProcessingModelComment *comment();
virtual void setComment( const QgsProcessingModelComment &comment );
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/processing/models/qgsprocessingmodelchildalgorithm.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
|