Skip to content

Commit

Permalink
[processing] Port field parameter widget to new API
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 4, 2020
1 parent 70ee385 commit 223dfaf
Show file tree
Hide file tree
Showing 5 changed files with 827 additions and 0 deletions.
9 changes: 9 additions & 0 deletions python/plugins/processing/gui/wrappers.py
Expand Up @@ -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):
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/gui/processing/qgsprocessingguiregistry.cpp
Expand Up @@ -44,6 +44,7 @@ QgsProcessingGuiRegistry::QgsProcessingGuiRegistry()
addParameterWidgetFactory( new QgsProcessingPointWidgetWrapper() );
addParameterWidgetFactory( new QgsProcessingColorWidgetWrapper() );
addParameterWidgetFactory( new QgsProcessingCoordinateOperationWidgetWrapper() );
addParameterWidgetFactory( new QgsProcessingFieldWidgetWrapper() );
}

QgsProcessingGuiRegistry::~QgsProcessingGuiRegistry()
Expand Down

0 comments on commit 223dfaf

Please sign in to comment.