Skip to content
Permalink
Browse files

Move getParametersPanel out of algorithm class

It's a gui related method, so shouldn't be in core class
  • Loading branch information
nyalldawson committed Jun 5, 2017
1 parent 168f162 commit 134c04b8bbc668ded028e7335f8a1c6ea41db161
@@ -41,7 +41,6 @@

from builtins import str
from builtins import object
from processing.gui.ParametersPanel import ParametersPanel
from processing.core.ProcessingConfig import ProcessingConfig
from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException
from processing.core.parameters import ParameterRaster, ParameterVector, ParameterMultipleInput, ParameterTable, Parameter
@@ -90,9 +89,6 @@ def defineCharacteristics(self):
"""
pass

def getParametersPanel(self, parent):
return ParametersPanel(parent, self)

def getCustomModelerParametersDialog(self, modelAlg, algName=None):
"""If the algorithm has a custom parameters dialog when called
from the modeler, it should be returned here, ready to be
@@ -38,6 +38,7 @@
from processing.core.ProcessingLog import ProcessingLog
from processing.core.ProcessingConfig import ProcessingConfig

from processing.gui.ParametersPanel import ParametersPanel
from processing.gui.BatchAlgorithmDialog import BatchAlgorithmDialog
from processing.gui.AlgorithmDialogBase import AlgorithmDialogBase
from processing.gui.AlgorithmExecutor import execute, executeIterating
@@ -62,7 +63,7 @@ def __init__(self, alg):

self.alg = alg

self.setMainWidget(alg.getParametersPanel(self))
self.setMainWidget(self.getParametersPanel(alg, self))

self.bar = QgsMessageBar()
self.bar.setSizePolicy(QSizePolicy.Minimum, QSizePolicy.Fixed)
@@ -78,6 +79,9 @@ def __init__(self, alg):
self.cornerWidget.setLayout(layout)
self.tabWidget.setCornerWidget(self.cornerWidget)

def getParametersPanel(self, alg, parent):
return ParametersPanel(parent, alg)

def runAsBatch(self):
self.close()
dlg = BatchAlgorithmDialog(self.alg)

0 comments on commit 134c04b

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