mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
[processing] Make model to/from variant methods public
This commit is contained in:
parent
01bf140763
commit
1fea03fec7
@ -291,6 +291,26 @@ Writes the model to a file, at the specified ``path``.
|
||||
Reads the model from a file, at the specified ``path``.
|
||||
|
||||
.. seealso:: :py:func:`toFile`
|
||||
%End
|
||||
|
||||
QVariant toVariant() const;
|
||||
%Docstring
|
||||
Saves this model to a QVariantMap, wrapped in a QVariant.
|
||||
You can use QgsXmlUtils.writeVariant to save it to an XML document.
|
||||
|
||||
.. seealso:: :py:func:`loadVariant`
|
||||
|
||||
.. versionadded:: 3.4
|
||||
%End
|
||||
|
||||
bool loadVariant( const QVariant &variant );
|
||||
%Docstring
|
||||
Loads this model from a QVariantMap, wrapped in a QVariant ``variant``.
|
||||
You can use QgsXmlUtils.readVariant to load it from an XML document.
|
||||
|
||||
.. seealso:: :py:func:`toVariant`
|
||||
|
||||
.. versionadded:: 3.4
|
||||
%End
|
||||
|
||||
QVariantMap &helpContent();
|
||||
|
@ -251,6 +251,24 @@ class CORE_EXPORT QgsProcessingModelAlgorithm : public QgsProcessingAlgorithm
|
||||
*/
|
||||
bool fromFile( const QString &path );
|
||||
|
||||
/**
|
||||
* Saves this model to a QVariantMap, wrapped in a QVariant.
|
||||
* You can use QgsXmlUtils::writeVariant to save it to an XML document.
|
||||
*
|
||||
* \see loadVariant()
|
||||
* \since QGIS 3.4
|
||||
*/
|
||||
QVariant toVariant() const;
|
||||
|
||||
/**
|
||||
* Loads this model from a QVariantMap, wrapped in a QVariant \a variant.
|
||||
* You can use QgsXmlUtils::readVariant to load it from an XML document.
|
||||
*
|
||||
* \see toVariant()
|
||||
* \since QGIS 3.4
|
||||
*/
|
||||
bool loadVariant( const QVariant &variant );
|
||||
|
||||
/**
|
||||
* Returns the model's help contents (a free-form map of values describing the algorithm's
|
||||
* use and metadata).
|
||||
@ -387,22 +405,6 @@ class CORE_EXPORT QgsProcessingModelAlgorithm : public QgsProcessingAlgorithm
|
||||
*/
|
||||
bool childOutputIsRequired( const QString &childId, const QString &outputName ) const;
|
||||
|
||||
/**
|
||||
* Saves this model to a QVariantMap, wrapped in a QVariant.
|
||||
* You can use QgsXmlUtils::writeVariant to save it to an XML document.
|
||||
*
|
||||
* \see loadVariant()
|
||||
*/
|
||||
QVariant toVariant() const;
|
||||
|
||||
/**
|
||||
* Loads this model from a QVariantMap, wrapped in a QVariant.
|
||||
* You can use QgsXmlUtils::readVariant to load it from an XML document.
|
||||
*
|
||||
* \see toVariant()
|
||||
*/
|
||||
bool loadVariant( const QVariant &model );
|
||||
|
||||
/**
|
||||
* Checks whether the output vector type given by \a outputType is compatible
|
||||
* with the list of acceptable data types specified by \a acceptableDataTypes.
|
||||
|
Loading…
x
Reference in New Issue
Block a user