Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[processing] some refactoring. Removed old-style signals connection
  • Loading branch information
volaya committed Oct 6, 2013
1 parent 17f3f79 commit acbd165
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 27 deletions.
1 change: 0 additions & 1 deletion python/plugins/processing/gui/EditScriptAction.py
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/gui/ExtentSelectionPanel.py
Expand Up @@ -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:
Expand Down
14 changes: 5 additions & 9 deletions python/plugins/processing/gui/FixedTableDialog.py
Expand Up @@ -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):
Expand Down Expand Up @@ -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'))
2 changes: 1 addition & 1 deletion python/plugins/processing/gui/FixedTablePanel.py
Expand Up @@ -25,7 +25,7 @@

__revision__ = '$Format:%H$'

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


Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/gui/MultipleInputDialog.py
Expand Up @@ -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)
15 changes: 1 addition & 14 deletions python/plugins/processing/gui/MultipleInputPanel.py
Expand Up @@ -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:
Expand Down

0 comments on commit acbd165

Please sign in to comment.