Skip to content
Permalink
Browse files

[processing] added 'run as batch' button in algorithm dialog

  • Loading branch information
volaya committed Sep 24, 2015
1 parent 4d4ce94 commit 1340f4d4f121c14c36a9f2237dc183e5f125017d
@@ -14,6 +14,17 @@ def __init__(self, alg):

self.mainWidget = GdalParametersPanel(self, alg)
self.setMainWidget()

cornerWidget = QWidget()
layout = QVBoxLayout();
layout.setContentsMargins(0,0,0,5);
self.tabWidget.setStyleSheet("QTabBar::tab { height: 30px; }");
runAsBatchButton = QPushButton("Run as batch process...")
runAsBatchButton.clicked.connect(self.runAsBatch)
layout.addWidget(runAsBatchButton)
cornerWidget.setLayout(layout)
self.tabWidget.setCornerWidget(cornerWidget)

self.mainWidget.parametersHaveChanged()


@@ -26,11 +26,13 @@
__revision__ = '$Format:%H$'

from PyQt4.QtCore import Qt
from PyQt4.QtGui import QMessageBox, QApplication, QCursor, QColor, QPalette
from PyQt4.QtGui import QMessageBox, QApplication, QCursor, QColor, QPalette, QPushButton, QWidget,\
QVBoxLayout

from processing.core.ProcessingLog import ProcessingLog
from processing.core.ProcessingConfig import ProcessingConfig

from processing.gui.BatchAlgorithmDialog import BatchAlgorithmDialog
from processing.gui.ParametersPanel import ParametersPanel
from processing.gui.AlgorithmDialogBase import AlgorithmDialogBase
from processing.gui.AlgorithmExecutor import runalg, runalgIterating
@@ -69,6 +71,21 @@ def __init__(self, alg):
self.mainWidget = ParametersPanel(self, alg)
self.setMainWidget()

cornerWidget = QWidget()
layout = QVBoxLayout();
layout.setContentsMargins(0,0,0,5);
self.tabWidget.setStyleSheet("QTabBar::tab { height: 30px; }");
runAsBatchButton = QPushButton("Run as batch process...")
runAsBatchButton.clicked.connect(self.runAsBatch)
layout.addWidget(runAsBatchButton)
cornerWidget.setLayout(layout)
self.tabWidget.setCornerWidget(cornerWidget)

def runAsBatch(self):
dlg = BatchAlgorithmDialog(self.alg)
dlg.show()
dlg.exec_()

def setParamValues(self):
params = self.alg.parameters
outputs = self.alg.outputs

0 comments on commit 1340f4d

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