Skip to content
Permalink
Browse files

[processing] some refactoring. Removed old-style signals connection

  • Loading branch information
volaya committed Sep 26, 2013
1 parent 17f3f79 commit acbd165539f5aa52c7a02435b7cc0edc31e5f408
@@ -27,7 +27,6 @@

from processing.gui.ContextAction import ContextAction
from processing.gui.ScriptEditorDialog import ScriptEditorDialog

from processing.r.RAlgorithm import RAlgorithm
from processing.script.ScriptAlgorithm import ScriptAlgorithm

@@ -62,7 +62,7 @@ def __init__(self, dialog, alg, default):
canvas = interface.iface.mapCanvas()
self.prevMapTool = canvas.mapTool()
self.tool = RectangleMapTool(canvas)
self.connect(self.tool, SIGNAL('rectangleCreated()'), self.fillCoords)
self.tool.rectangleCreated.connect(self.fillCoords)

def canUseAutoExtent(self):
for param in self.params:
@@ -75,14 +75,10 @@ def setupUi(self):
self.horizontalLayout.addWidget(self.table)
self.horizontalLayout.addWidget(self.buttonBox)
self.setLayout(self.horizontalLayout)
QObject.connect(self.buttonBox, QtCore.SIGNAL('accepted()'),
self.okPressed)
QObject.connect(self.buttonBox, QtCore.SIGNAL('rejected()'),
self.cancelPressed)
QObject.connect(self.addRowButton, QtCore.SIGNAL('clicked()'),
self.addRow)
QObject.connect(self.removeRowButton, QtCore.SIGNAL('clicked()'),
self.removeRow)
self.buttonBox.accepted.connect(self.okPressed)
self.buttonBox.rejected.connect(self.cancelPressed)
self.addRowButton.clicked.connect(self.addRow)
self.removeRowButton.clicked.connect(self.removeRow)
QtCore.QMetaObject.connectSlotsByName(self)

def setTableContent(self):
@@ -112,4 +108,4 @@ def addRow(self):
self.table.setRowHeight(self.table.rowCount() - 1, 22)
for i in range(self.table.columnCount()):
self.table.setItem(self.table.rowCount() - 1, i,
QtGui.QTableWidgetItem('0'))
QtGui.QTableWidgetItem('0'))
@@ -25,7 +25,7 @@

__revision__ = '$Format:%H$'

from PyQt4 import QtCore, QtGui
from PyQt4 import QtGui
from processing.gui.FixedTableDialog import FixedTableDialog


@@ -79,4 +79,4 @@ def toggleSelection(self):
break
for i in range(len(self.options)):
widget = self.tblLayers.cellWidget(i, 0)
widget.setChecked(checked)
widget.setChecked(checked)
@@ -57,20 +57,7 @@ def setSelectedItems(self, selected):
+ ' elements selected')

def showSelectionDialog(self):
# =====================================================================
# #If there is a datatype, we use it to create the list of options
# if self.datatype is not None:
# if self.datatype == ParameterMultipleInput.TYPE_RASTER:
# options = dataobjects.getRasterLayers()
# elif self.datatype == ParameterMultipleInput.TYPE_VECTOR_ANY:
# options = dataobjects.getVectorLayers()
# else:
# options = dataobjects.getVectorLayers(self.datatype)
# opts = []
# for opt in options:
# opts.append(opt.name())
# self.options = opts
# =====================================================================

dlg = MultipleInputDialog(self.options, self.selectedoptions)
dlg.exec_()
if dlg.selectedoptions is not None:

0 comments on commit acbd165

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