Skip to content
Permalink
Browse files

[processing] Port field parameter widget to new API

  • Loading branch information
nyalldawson committed Jan 4, 2020
1 parent 70ee385 commit 223dfafb15dc82b011b3d1158fb84b6bb6f32e58
@@ -1503,6 +1503,14 @@ class TableFieldWidgetWrapper(WidgetWrapper):

def __init__(self, param, dialog, row=0, col=0, **kwargs):
super().__init__(param, dialog, row, col, **kwargs)
"""
.. deprecated:: 3.12
Do not use, will be removed in QGIS 4.0
"""

from warnings import warn
warn("TableFieldWidgetWrapper is deprecated and will be removed in QGIS 4.0", DeprecationWarning)

self.context = dataobjects.createContext()

def createWidget(self):
@@ -1846,6 +1854,7 @@ def create_wrapper_from_class(param, dialog, row=0, col=0):
elif param.type() == 'vector':
wrapper = VectorLayerWidgetWrapper
elif param.type() == 'field':
# deprecated, moved to c++
wrapper = TableFieldWidgetWrapper
elif param.type() == 'source':
wrapper = FeatureSourceWidgetWrapper
@@ -44,6 +44,7 @@ QgsProcessingGuiRegistry::QgsProcessingGuiRegistry()
addParameterWidgetFactory( new QgsProcessingPointWidgetWrapper() );
addParameterWidgetFactory( new QgsProcessingColorWidgetWrapper() );
addParameterWidgetFactory( new QgsProcessingCoordinateOperationWidgetWrapper() );
addParameterWidgetFactory( new QgsProcessingFieldWidgetWrapper() );
}

QgsProcessingGuiRegistry::~QgsProcessingGuiRegistry()

0 comments on commit 223dfaf

Please sign in to comment.
You can’t perform that action at this time.