Fix dox test

This commit is contained in:
Nyall Dawson 2019-02-19 16:35:33 +10:00
parent 6021683c35
commit b06f00d01b
3 changed files with 29 additions and 0 deletions

View File

@ -52,6 +52,19 @@ to fine-tune its behavior.
Subclasses should take care to call the base class method when reimplementing this method.
.. seealso:: :py:func:`widgetContext`
.. versionadded:: 3.6
%End
const QgsProcessingParameterWidgetContext &widgetContext() const;
%Docstring
Returns the context in which the Processing algorithm widget is shown, e.g., the
parent model algorithm, a linked map canvas, and other relevant information which allows the widget
to fine-tune its behavior.
.. seealso:: :py:func:`setWidgetContext`
.. versionadded:: 3.6
%End
void setAlgorithm( const QgsProcessingAlgorithm *algorithm );

View File

@ -27,6 +27,11 @@ void QgsProcessingAlgorithmConfigurationWidget::setWidgetContext( const QgsProce
mWidgetContext = context;
}
const QgsProcessingParameterWidgetContext &QgsProcessingAlgorithmConfigurationWidget::widgetContext() const
{
return mWidgetContext;
}
void QgsProcessingAlgorithmConfigurationWidget::setAlgorithm( const QgsProcessingAlgorithm *algorithm )
{
mAlgorithm = algorithm;

View File

@ -67,9 +67,20 @@ class GUI_EXPORT QgsProcessingAlgorithmConfigurationWidget : public QWidget, pub
* Subclasses should take care to call the base class method when reimplementing this method.
*
* \see widgetContext()
* \since QGIS 3.6
*/
virtual void setWidgetContext( const QgsProcessingParameterWidgetContext &context );
/**
* Returns the context in which the Processing algorithm widget is shown, e.g., the
* parent model algorithm, a linked map canvas, and other relevant information which allows the widget
* to fine-tune its behavior.
*
* \see setWidgetContext()
* \since QGIS 3.6
*/
const QgsProcessingParameterWidgetContext &widgetContext() const;
/**
* Sets the algorithm instance associated with the widget.
*