A widget wrapper for Processing parameter value widgets.
Widget wrappers are used to create widgets for individual Processing parameters, and handle retrieving and setting the current value for those parameters.
Widget wrappers can be created for different dialog types, allowing different appearance and behavior of widgets depending on whether they are being created for use in a standard algorithm dialog, a batch processing dialog, or a modeler dialog.
Individual widget wrappers are not usually created directly, instead they are constructed through the central registry, via calls to QgsGui::processingGuiRegistry()->createParameterWidgetWrapper().
- Since
- QGIS 3.4
Definition at line 282 of file qgsprocessingwidgetwrapper.h.
QLabel * QgsAbstractProcessingParameterWidgetWrapper::createLabel |
( |
| ) |
|
|
protectedvirtual |
Creates a new label to accompany widgets created by the wrapper.
The caller takes ownership of the returned label. Some parameter type and dialog type combinations will return nullptr
for this method. If NULLPTR is returned, then no label should be shown for the parameter's widget (i.e. the label is embedded inside the widget itself).
- See also
- createWidget()
Reimplemented in QgsProcessingHiddenWidgetWrapper.
Definition at line 223 of file qgsprocessingwidgetwrapper.cpp.
QLabel * QgsAbstractProcessingParameterWidgetWrapper::createWrappedLabel |
( |
| ) |
|
Creates and returns a new label to accompany widgets created by the wrapper.
The caller takes ownership of the returned label. Some parameter type and dialog type combinations will return nullptr
for this method. If NULLPTR is returned, then no label should be shown for the parameter's widget (i.e. the label is embedded inside the widget itself).
The wrapped label can be retrieved at a later stage by calling wrappedLabel().
- See also
- createWrappedWidget()
Definition at line 161 of file qgsprocessingwidgetwrapper.cpp.
const QgsVectorLayer * QgsAbstractProcessingParameterWidgetWrapper::linkedVectorLayer |
( |
| ) |
const |
|
protectedvirtual |
Returns the optional vector layer associated with this widget wrapper, or nullptr
if no vector layer is applicable.
This is used to correctly generate expression contexts within the GUI, e.g. to allow expression buttons and property override buttons to correctly show the appropriate vector layer fields.
- Since
- QGIS 3.6
Reimplemented in QgsProcessingHiddenWidgetWrapper.
Definition at line 244 of file qgsprocessingwidgetwrapper.cpp.