Skip to content
Permalink
Browse files
[processing] fixed batch processing interface
Conflicts:
	python/plugins/processing/gui/BatchAlgorithmDialog.py
  • Loading branch information
volaya committed Oct 5, 2016
1 parent ccdf372 commit 56225c4d8cf46676fbf4ce1f1a88ee7538bfc945
Showing with 15 additions and 7 deletions.
  1. +15 −7 python/plugins/processing/gui/BatchAlgorithmDialog.py
@@ -27,9 +27,11 @@
__revision__ = '$Format:%H$'

from qgis.PyQt.QtWidgets import QApplication, QMessageBox
from qgis.PyQt.QtGui import QCursor
from qgis.PyQt.QtGui import QCursor, QSizePolicy
from qgis.PyQt.QtCore import Qt

from qgis.gui import QgsMessageBar

from processing.gui.BatchPanel import BatchPanel
from processing.gui.AlgorithmDialogBase import AlgorithmDialogBase
from processing.gui.AlgorithmExecutor import runalg
@@ -60,6 +62,10 @@ def __init__(self, alg):

self.textShortHelp.setVisible(False)

self.bar = QgsMessageBar()
self.bar.setSizePolicy(QSizePolicy.Minimum, QSizePolicy.Fixed)
self.layout().insertWidget(0, self.bar)

def accept(self):
self.algs = []
self.load = []
@@ -71,10 +77,11 @@ def accept(self):
for param in alg.parameters:
if param.hidden:
continue
widget = self.mainWidget.tblParameters.cellWidget(row, col)
if not self.mainWidget.setParamValue(param, widget, alg):
self.lblProgress.setText(
self.tr('<b>Missing parameter value: %s (row %d)</b>') % (param.description, row + 1))
wrapper = self.mainWidget.wrappers[row][col]
if not self.mainWidget.setParamValue(param, wrapper, alg):
self.bar.pushMessage("", self.tr('Wrong or missing parameter value: %s (row %d)')
% (param.description, row + 1),
level=QgsMessageBar.WARNING, duration=5)
self.algs = None
return
col += 1
@@ -88,8 +95,9 @@ def accept(self):
out.value = text
col += 1
else:
self.lblProgress.setText(
self.tr('<b>Wrong or missing parameter value: %s (row %d)</b>') % (out.description, row + 1))
self.bar.pushMessage("", self.tr('Wrong or missing output value: %s (row %d)')
% (out.description, row + 1),
level=QgsMessageBar.WARNING, duration=5)
self.algs = None
return

0 comments on commit 56225c4

Please sign in to comment.