From b06f00d01b63bf74c2629296e1bbba3a788a2a55 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Tue, 19 Feb 2019 16:35:33 +1000 Subject: [PATCH] Fix dox test --- ...qgsprocessingalgorithmconfigurationwidget.sip.in | 13 +++++++++++++ .../qgsprocessingalgorithmconfigurationwidget.cpp | 5 +++++ .../qgsprocessingalgorithmconfigurationwidget.h | 11 +++++++++++ 3 files changed, 29 insertions(+) diff --git a/python/gui/auto_generated/processing/qgsprocessingalgorithmconfigurationwidget.sip.in b/python/gui/auto_generated/processing/qgsprocessingalgorithmconfigurationwidget.sip.in index 65c716dec04..c38c508eab2 100644 --- a/python/gui/auto_generated/processing/qgsprocessingalgorithmconfigurationwidget.sip.in +++ b/python/gui/auto_generated/processing/qgsprocessingalgorithmconfigurationwidget.sip.in @@ -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 ); diff --git a/src/gui/processing/qgsprocessingalgorithmconfigurationwidget.cpp b/src/gui/processing/qgsprocessingalgorithmconfigurationwidget.cpp index 482722e9865..8cdbba18d87 100644 --- a/src/gui/processing/qgsprocessingalgorithmconfigurationwidget.cpp +++ b/src/gui/processing/qgsprocessingalgorithmconfigurationwidget.cpp @@ -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; diff --git a/src/gui/processing/qgsprocessingalgorithmconfigurationwidget.h b/src/gui/processing/qgsprocessingalgorithmconfigurationwidget.h index 055b6d1fe49..0f5eec6c572 100644 --- a/src/gui/processing/qgsprocessingalgorithmconfigurationwidget.h +++ b/src/gui/processing/qgsprocessingalgorithmconfigurationwidget.h @@ -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. *