Merge ParametersDialog & Ui_ParametersDialog. (Remnant from QT Designer?)

git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@299 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
This commit is contained in:
cpolymeris@gmail.com 2012-07-13 18:30:14 +00:00
parent ea2b7faf60
commit d40660cdef
2 changed files with 5 additions and 8 deletions

View File

@ -37,17 +37,14 @@ except AttributeError:
_fromUtf8 = lambda s: s
class ParametersDialog(QtGui.QDialog):
NOT_SELECTED = "[Not selected]"
'''the default parameters dialog, to be used when an algorithm is called from the toolbox'''
def __init__(self, alg):
QtGui.QDialog.__init__(self, None, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
self.ui = Ui_ParametersDialog()
self.ui.setupUi(self, alg)
self.setupUi(self, alg)
self.executed = False
class Ui_ParametersDialog(object):
NOT_SELECTED = "[Not selected]"
def setupUi(self, dialog, alg):
self.alg = alg
self.dialog = dialog

View File

@ -151,9 +151,9 @@ class SextanteProviderTestCase(unittest.TestCase):
if not dlg:
dlg = ParametersDialog(self.alg)
# hack to handle that hacky code...
dlg.ui.setParamValues = lambda: True
dlg.setParamValues = lambda: True
dlg.show()
dlg.ui.accept()
dlg.accept()
while (not dlg.executed):
time.sleep(.5)