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

This commit is contained in:
Victor Olaya 2013-09-27 00:33:14 +02:00
parent 17f3f79fc6
commit acbd165539
6 changed files with 9 additions and 27 deletions

View File

@ -27,7 +27,6 @@ __revision__ = '$Format:%H$'
from processing.gui.ContextAction import ContextAction
from processing.gui.ScriptEditorDialog import ScriptEditorDialog
from processing.r.RAlgorithm import RAlgorithm
from processing.script.ScriptAlgorithm import ScriptAlgorithm

View File

@ -62,7 +62,7 @@ class ExtentSelectionPanel(QtGui.QWidget):
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:

View File

@ -75,14 +75,10 @@ class FixedTableDialog(QtGui.QDialog):
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 @@ class FixedTableDialog(QtGui.QDialog):
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'))

View File

@ -25,7 +25,7 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
from PyQt4 import QtCore, QtGui
from PyQt4 import QtGui
from processing.gui.FixedTableDialog import FixedTableDialog

View File

@ -79,4 +79,4 @@ class MultipleInputDialog(QDialog, Ui_DlgMultipleSelection):
break
for i in range(len(self.options)):
widget = self.tblLayers.cellWidget(i, 0)
widget.setChecked(checked)
widget.setChecked(checked)

View File

@ -57,20 +57,7 @@ class MultipleInputPanel(QtGui.QWidget):
+ ' 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: