QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
QgsProcessingParameterDefinitionWidget Class Reference

A widget which allow users to specify the properties of a Processing parameter. More...

#include <qgsprocessingparameterdefinitionwidget.h>

Inheritance diagram for QgsProcessingParameterDefinitionWidget:
Inheritance graph
[legend]

Public Member Functions

 QgsProcessingParameterDefinitionWidget (const QString &type, QgsProcessingContext &context, const QgsProcessingParameterWidgetContext &widgetContext, const QgsProcessingParameterDefinition *definition=nullptr, const QgsProcessingAlgorithm *algorithm=nullptr, QWidget *parent=nullptr)
 Constructor for QgsProcessingParameterDefinitionWidget, for a parameter of the specified type.
 
QgsProcessingParameterDefinitioncreateParameter (const QString &name=QString()) const
 Returns a new instance of a parameter definition, using the current settings defined in the dialog.
 
void registerProcessingContextGenerator (QgsProcessingContextGenerator *generator)
 Registers a Processing context generator class that will be used to retrieve a Processing context for the widget when required.
 

Friends

class QgsProcessingParameterDefinitionDialog
 

Detailed Description

A widget which allow users to specify the properties of a Processing parameter.

Since
QGIS 3.10

Definition at line 120 of file qgsprocessingparameterdefinitionwidget.h.

Constructor & Destructor Documentation

◆ QgsProcessingParameterDefinitionWidget()

QgsProcessingParameterDefinitionWidget::QgsProcessingParameterDefinitionWidget ( const QString &  type,
QgsProcessingContext context,
const QgsProcessingParameterWidgetContext widgetContext,
const QgsProcessingParameterDefinition definition = nullptr,
const QgsProcessingAlgorithm algorithm = nullptr,
QWidget *  parent = nullptr 
)

Constructor for QgsProcessingParameterDefinitionWidget, for a parameter of the specified type.

The context argument must specify a Processing context, which will be used by the widget to evaluate existing definition properties such as default values. Similarly, the widgetContext argument specifies the wider GUI context in which the widget will be used.

The optional definition argument may be used to provide a parameter definition to use to initially populate the widget's state.

Additionally, the optional algorithm parameter may be used to specify the algorithm or model associated with the parameter.

Definition at line 67 of file qgsprocessingparameterdefinitionwidget.cpp.

Member Function Documentation

◆ createParameter()

QgsProcessingParameterDefinition * QgsProcessingParameterDefinitionWidget::createParameter ( const QString &  name = QString()) const

Returns a new instance of a parameter definition, using the current settings defined in the dialog.

The name parameter specifies the name for the newly created parameter.

Definition at line 107 of file qgsprocessingparameterdefinitionwidget.cpp.

◆ registerProcessingContextGenerator()

void QgsProcessingParameterDefinitionWidget::registerProcessingContextGenerator ( QgsProcessingContextGenerator generator)

Registers a Processing context generator class that will be used to retrieve a Processing context for the widget when required.

Since
QGIS 3.18

Definition at line 137 of file qgsprocessingparameterdefinitionwidget.cpp.

Friends And Related Symbol Documentation

◆ QgsProcessingParameterDefinitionDialog

Definition at line 164 of file qgsprocessingparameterdefinitionwidget.h.


The documentation for this class was generated from the following files: