Skip to content

Commit acbd165

Browse files
committedOct 6, 2013
[processing] some refactoring. Removed old-style signals connection
1 parent 17f3f79 commit acbd165

File tree

6 files changed

+9
-27
lines changed

6 files changed

+9
-27
lines changed
 

‎python/plugins/processing/gui/EditScriptAction.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727

2828
from processing.gui.ContextAction import ContextAction
2929
from processing.gui.ScriptEditorDialog import ScriptEditorDialog
30-
3130
from processing.r.RAlgorithm import RAlgorithm
3231
from processing.script.ScriptAlgorithm import ScriptAlgorithm
3332

‎python/plugins/processing/gui/ExtentSelectionPanel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def __init__(self, dialog, alg, default):
6262
canvas = interface.iface.mapCanvas()
6363
self.prevMapTool = canvas.mapTool()
6464
self.tool = RectangleMapTool(canvas)
65-
self.connect(self.tool, SIGNAL('rectangleCreated()'), self.fillCoords)
65+
self.tool.rectangleCreated.connect(self.fillCoords)
6666

6767
def canUseAutoExtent(self):
6868
for param in self.params:

‎python/plugins/processing/gui/FixedTableDialog.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,10 @@ def setupUi(self):
7575
self.horizontalLayout.addWidget(self.table)
7676
self.horizontalLayout.addWidget(self.buttonBox)
7777
self.setLayout(self.horizontalLayout)
78-
QObject.connect(self.buttonBox, QtCore.SIGNAL('accepted()'),
79-
self.okPressed)
80-
QObject.connect(self.buttonBox, QtCore.SIGNAL('rejected()'),
81-
self.cancelPressed)
82-
QObject.connect(self.addRowButton, QtCore.SIGNAL('clicked()'),
83-
self.addRow)
84-
QObject.connect(self.removeRowButton, QtCore.SIGNAL('clicked()'),
85-
self.removeRow)
78+
self.buttonBox.accepted.connect(self.okPressed)
79+
self.buttonBox.rejected.connect(self.cancelPressed)
80+
self.addRowButton.clicked.connect(self.addRow)
81+
self.removeRowButton.clicked.connect(self.removeRow)
8682
QtCore.QMetaObject.connectSlotsByName(self)
8783

8884
def setTableContent(self):
@@ -112,4 +108,4 @@ def addRow(self):
112108
self.table.setRowHeight(self.table.rowCount() - 1, 22)
113109
for i in range(self.table.columnCount()):
114110
self.table.setItem(self.table.rowCount() - 1, i,
115-
QtGui.QTableWidgetItem('0'))
111+
QtGui.QTableWidgetItem('0'))

‎python/plugins/processing/gui/FixedTablePanel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
__revision__ = '$Format:%H$'
2727

28-
from PyQt4 import QtCore, QtGui
28+
from PyQt4 import QtGui
2929
from processing.gui.FixedTableDialog import FixedTableDialog
3030

3131

‎python/plugins/processing/gui/MultipleInputDialog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,4 @@ def toggleSelection(self):
7979
break
8080
for i in range(len(self.options)):
8181
widget = self.tblLayers.cellWidget(i, 0)
82-
widget.setChecked(checked)
82+
widget.setChecked(checked)

‎python/plugins/processing/gui/MultipleInputPanel.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -57,20 +57,7 @@ def setSelectedItems(self, selected):
5757
+ ' elements selected')
5858

5959
def showSelectionDialog(self):
60-
# =====================================================================
61-
# #If there is a datatype, we use it to create the list of options
62-
# if self.datatype is not None:
63-
# if self.datatype == ParameterMultipleInput.TYPE_RASTER:
64-
# options = dataobjects.getRasterLayers()
65-
# elif self.datatype == ParameterMultipleInput.TYPE_VECTOR_ANY:
66-
# options = dataobjects.getVectorLayers()
67-
# else:
68-
# options = dataobjects.getVectorLayers(self.datatype)
69-
# opts = []
70-
# for opt in options:
71-
# opts.append(opt.name())
72-
# self.options = opts
73-
# =====================================================================
60+
7461
dlg = MultipleInputDialog(self.options, self.selectedoptions)
7562
dlg.exec_()
7663
if dlg.selectedoptions is not None:

0 commit comments

Comments
 (0)
Please sign in to comment.