Since QGIS 3.6 processing models can be exported as python algorithms (right click on the model):
This opens the resulting processing algorithm in the script editor.
The order of gui elements is defined in the method initAlgorithm()
:
from qgis.core import QgsProcessingParameterEnum
from qgis.core import QgsProcessingParameterFeatureSink
from qgis.core import QgsProcessingParameterVectorDestination
import processing
class BbbbProcessor(QgsProcessingAlgorithm):
def initAlgorithm(self, config=None):
self.addParameter(QgsProcessingParameterField('1formelfradrschlssel', ...
self.addParameter(QgsProcessingParameterField('2formelfradressschlsselversorger', ...
self.addParameter(QgsProcessingParameterField('3testaufkderschlossen', ...
self.addParameter(QgsProcessingParameterVectorLayer('adr', ...
self.addParameter(QgsProcessingParameterString('adrneinderschlflst', ...
...
The desired order of gui elements can be achieved by simply re-ordering the self.addParameter()
method calls.
Note that this is more a workaround, since it hae to be done any time parameters change. If on the other hand only the process itself is changed and not the parameters, one may simply copy and paste the initAlgorithm()
method.